diff options
author | Jeff Davidson <jpd@google.com> | 2015-01-15 22:48:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-01-15 22:48:58 +0000 |
commit | 77a6b2f4cdd580d57630f079db1d908d7fd90a54 (patch) | |
tree | 586f7d5e9a7e05af45d0e821188097c0faa96219 /src/google/protobuf/stubs/strutil_unittest.cc | |
parent | c7c25812eb19d080087b71e08bfe35aff9f21433 (diff) | |
parent | a3b2a6da25a76f17c73d31def3952feb0fd2296e (diff) | |
download | external_protobuf-77a6b2f4cdd580d57630f079db1d908d7fd90a54.zip external_protobuf-77a6b2f4cdd580d57630f079db1d908d7fd90a54.tar.gz external_protobuf-77a6b2f4cdd580d57630f079db1d908d7fd90a54.tar.bz2 |
Merge "Update protobuf library from 2.3 to 2.6."
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. |