summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/debug_util_posix.cc2
-rw-r--r--base/string_util_unittest.cc9
2 files changed, 11 insertions, 0 deletions
diff --git a/base/debug_util_posix.cc b/base/debug_util_posix.cc
index 34cc45c..a6d5199 100644
--- a/base/debug_util_posix.cc
+++ b/base/debug_util_posix.cc
@@ -108,7 +108,9 @@ bool DebugUtil::BeingDebugged() {
// static
void DebugUtil::BreakDebugger() {
+#if !defined(ARCH_CPU_ARM_FAMILY)
asm ("int3");
+#endif
}
StackTrace::StackTrace() {
diff --git a/base/string_util_unittest.cc b/base/string_util_unittest.cc
index c7b881e..ed6b68f 100644
--- a/base/string_util_unittest.cc
+++ b/base/string_util_unittest.cc
@@ -311,7 +311,11 @@ TEST(StringUtilTest, ConvertUTF8ToWide) {
std::wstring converted;
EXPECT_TRUE(UTF8ToWide("\00Z\t", 3, &converted));
ASSERT_EQ(3U, converted.length());
+#if defined(WCHAR_T_IS_UNSIGNED)
+ EXPECT_EQ(0U, converted[0]);
+#else
EXPECT_EQ(0, converted[0]);
+#endif
EXPECT_EQ('Z', converted[1]);
EXPECT_EQ('\t', converted[2]);
@@ -1509,8 +1513,13 @@ TEST(StringUtilTest, LcpyTest) {
EXPECT_EQ(1, dst[0]);
EXPECT_EQ(2, dst[1]);
EXPECT_EQ(7U, base::wcslcpy(wdst, L"abcdefg", 0));
+#if defined(WCHAR_T_IS_UNSIGNED)
+ EXPECT_EQ(1U, wdst[0]);
+ EXPECT_EQ(2U, wdst[1]);
+#else
EXPECT_EQ(1, wdst[0]);
EXPECT_EQ(2, wdst[1]);
+#endif
}
// Test the case were we _just_ competely fit including the null.