diff options
Diffstat (limited to 'src/google/protobuf/stubs/strutil_unittest.cc')
-rw-r--r-- | src/google/protobuf/stubs/strutil_unittest.cc | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/google/protobuf/stubs/strutil_unittest.cc b/src/google/protobuf/stubs/strutil_unittest.cc index b9c9253..fde54f0 100644 --- a/src/google/protobuf/stubs/strutil_unittest.cc +++ b/src/google/protobuf/stubs/strutil_unittest.cc @@ -51,27 +51,17 @@ TEST(StringUtilityTest, ImmuneToLocales) { // Set the locale to "C". ASSERT_TRUE(setlocale(LC_NUMERIC, "C") != NULL); - EXPECT_EQ(1.5, NoLocaleStrtod("1.5", NULL)); EXPECT_EQ("1.5", SimpleDtoa(1.5)); EXPECT_EQ("1.5", SimpleFtoa(1.5)); - // Verify that the endptr is set correctly even if not all text was parsed. - const char* text = "1.5f"; - char* endptr; - EXPECT_EQ(1.5, NoLocaleStrtod(text, &endptr)); - EXPECT_EQ(3, endptr - text); - if (setlocale(LC_NUMERIC, "es_ES") == NULL && setlocale(LC_NUMERIC, "es_ES.utf8") == NULL) { // Some systems may not have the desired locale available. GOOGLE_LOG(WARNING) << "Couldn't set locale to es_ES. Skipping this test."; } else { - EXPECT_EQ(1.5, NoLocaleStrtod("1.5", NULL)); EXPECT_EQ("1.5", SimpleDtoa(1.5)); EXPECT_EQ("1.5", SimpleFtoa(1.5)); - EXPECT_EQ(1.5, NoLocaleStrtod(text, &endptr)); - EXPECT_EQ(3, endptr - text); } // Return to original locale. |