diff options
Diffstat (limited to 'base/stringprintf_unittest.cc')
-rw-r--r-- | base/stringprintf_unittest.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/stringprintf_unittest.cc b/base/stringprintf_unittest.cc index 6f4458b..305d24a 100644 --- a/base/stringprintf_unittest.cc +++ b/base/stringprintf_unittest.cc @@ -28,7 +28,9 @@ TEST(StringPrintfTest, StringPrintfEmpty) { TEST(StringPrintfTest, StringPrintfMisc) { EXPECT_EQ("123hello w", StringPrintf("%3d%2s %1c", 123, "hello", 'w')); +#if !defined(OS_ANDROID) EXPECT_EQ(L"123hello w", StringPrintf(L"%3d%2ls %1lc", 123, L"hello", 'w')); +#endif } TEST(StringPrintfTest, StringAppendfEmptyString) { @@ -36,9 +38,11 @@ TEST(StringPrintfTest, StringAppendfEmptyString) { StringAppendF(&value, "%s", ""); EXPECT_EQ("Hello", value); +#if !defined(OS_ANDROID) std::wstring valuew(L"Hello"); StringAppendF(&valuew, L"%ls", L""); EXPECT_EQ(L"Hello", valuew); +#endif } TEST(StringPrintfTest, StringAppendfString) { @@ -46,9 +50,11 @@ TEST(StringPrintfTest, StringAppendfString) { StringAppendF(&value, " %s", "World"); EXPECT_EQ("Hello World", value); +#if !defined(OS_ANDROID) std::wstring valuew(L"Hello"); StringAppendF(&valuew, L" %ls", L"World"); EXPECT_EQ(L"Hello World", valuew); +#endif } TEST(StringPrintfTest, StringAppendfInt) { @@ -56,9 +62,11 @@ TEST(StringPrintfTest, StringAppendfInt) { StringAppendF(&value, " %d", 123); EXPECT_EQ("Hello 123", value); +#if !defined(OS_ANDROID) std::wstring valuew(L"Hello"); StringAppendF(&valuew, L" %d", 123); EXPECT_EQ(L"Hello 123", valuew); +#endif } // Make sure that lengths exactly around the initial buffer size are handled @@ -79,10 +87,12 @@ TEST(StringPrintfTest, StringPrintfBounds) { SStringPrintf(&out, "%s", src); EXPECT_STREQ(src, out.c_str()); +#if !defined(OS_ANDROID) srcw[kSrcLen - i] = 0; std::wstring outw; SStringPrintf(&outw, L"%ls", srcw); EXPECT_STREQ(srcw, outw.c_str()); +#endif } } |