aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/strings/str_util_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-04-06 08:54:07 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-04-06 10:01:58 -0700
commite44c0f6339888e97d7c07a5e4e4a4d101e9473b7 (patch)
treee3c4a99b724818b1769e17099e8a6b72026599f6 /tensorflow/core/lib/strings/str_util_test.cc
parent8c44d4d7258b35da0275852a6a0c8afa28d16ea7 (diff)
Remove NumericParse32 from str_util.h, replacing calls with safe_strto32 from
numbers.h. This removes the duplicate code, but has a small behavior change - safe_strto32 strips leading and trailing whitespace, while NumericParse does not. But this seems okay. Also changed the flag parsing command_line_flags.cc to template on int32 instead of int. Change: 119170865
Diffstat (limited to 'tensorflow/core/lib/strings/str_util_test.cc')
-rw-r--r--tensorflow/core/lib/strings/str_util_test.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/tensorflow/core/lib/strings/str_util_test.cc b/tensorflow/core/lib/strings/str_util_test.cc
index 0fdae33ad8..7cb7f6ca95 100644
--- a/tensorflow/core/lib/strings/str_util_test.cc
+++ b/tensorflow/core/lib/strings/str_util_test.cc
@@ -43,15 +43,6 @@ TEST(CUnescape, Basic) {
EXPECT_EQ("\320hi\200", ExpectCUnescapeSuccess("\\320hi\\200"));
}
-TEST(NumericParse32, Basic) {
- int32 val = -1234;
- EXPECT_TRUE(str_util::NumericParse32("0", &val) && val == 0);
- EXPECT_TRUE(str_util::NumericParse32("123", &val) && val == 123);
- EXPECT_TRUE(str_util::NumericParse32("-375", &val) && val == -375);
- EXPECT_FALSE(str_util::NumericParse32("123hello", &val));
- EXPECT_FALSE(str_util::NumericParse32("hello123", &val));
-}
-
TEST(StripTrailingWhitespace, Basic) {
string test;
test = "hello";