aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib
diff options
context:
space:
mode:
authorGravatar Rachel Lim <rachelim@google.com>2018-06-06 14:51:37 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-06 14:54:29 -0700
commit7cb4b129543eb67b54a0c9373f904a699c338a1f (patch)
tree404a050c15a4198201d995dc6be6c84bb8fc309f /tensorflow/core/lib
parent4a2104ce30cd2a931ca3bae260d7394815f5dcae (diff)
Removed parts of numbers_test that caused asan/msan/tsan failure
PiperOrigin-RevId: 199533243
Diffstat (limited to 'tensorflow/core/lib')
-rw-r--r--tensorflow/core/lib/strings/numbers_test.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/tensorflow/core/lib/strings/numbers_test.cc b/tensorflow/core/lib/strings/numbers_test.cc
index 0f22dac262..5b595f9847 100644
--- a/tensorflow/core/lib/strings/numbers_test.cc
+++ b/tensorflow/core/lib/strings/numbers_test.cc
@@ -289,12 +289,9 @@ TEST(safe_strtof, Float) {
EXPECT_FALSE(safe_strtof("-infinity is awesome", &result));
- // Make sure we exit cleanly if the string is not terminated
+ // Make sure we exit cleanly if the string is too long
char test_str[2 * kFastToBufferSize];
for (int i = 0; i < 2 * kFastToBufferSize; ++i) test_str[i] = 'a';
- EXPECT_FALSE(safe_strtof(test_str, &result));
-
- // Make sure we exit cleanly if the string is too long
test_str[kFastToBufferSize + 1] = '\0';
EXPECT_FALSE(safe_strtof(test_str, &result));
@@ -330,12 +327,9 @@ TEST(safe_strtod, Double) {
EXPECT_EQ(0.1234567890123, result);
EXPECT_FALSE(safe_strtod("0.1234567890123abc", &result));
- // Make sure we exit cleanly if the string is not terminated
+ // Make sure we exit cleanly if the string is too long
char test_str[2 * kFastToBufferSize];
for (int i = 0; i < 2 * kFastToBufferSize; ++i) test_str[i] = 'a';
- EXPECT_FALSE(safe_strtod(test_str, &result));
-
- // Make sure we exit cleanly if the string is too long
test_str[kFastToBufferSize + 1] = '\0';
EXPECT_FALSE(safe_strtod(test_str, &result));