aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/tensor_slice_reader_test.cc
diff options
context:
space:
mode:
authorGravatar Geoffrey Irving <geoffreyi@google.com>2016-01-20 09:53:21 -0800
committerGravatar Manjunath Kudlur <keveman@gmail.com>2016-01-20 10:38:46 -0800
commitc878ce6ae549a72dbdbd2c41f33fa3dec75bb555 (patch)
treed259ca4b3afcb0c9f646d921aa6dc153b97360c2 /tensorflow/core/util/tensor_slice_reader_test.cc
parentc8eaac926c929e07ac8db69f67803a2223ff2d93 (diff)
Change DebugString behavior to ShortDebugString
The old behavior of DebugString is needlessly verbose and is quite confusing for scalar shapes (it produced the empty string). Now DebugString is the same as ShortDebugString. A future commit will remove ShortDebugString. Change: 112590646
Diffstat (limited to 'tensorflow/core/util/tensor_slice_reader_test.cc')
-rw-r--r--tensorflow/core/util/tensor_slice_reader_test.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/tensorflow/core/util/tensor_slice_reader_test.cc b/tensorflow/core/util/tensor_slice_reader_test.cc
index 502126d8f6..1a2d866ee8 100644
--- a/tensorflow/core/util/tensor_slice_reader_test.cc
+++ b/tensorflow/core/util/tensor_slice_reader_test.cc
@@ -115,10 +115,7 @@ void SimpleFloatHelper(TensorSliceWriter::CreateBuilderFunction create_function,
TensorShape shape;
DataType type;
EXPECT_TRUE(reader.HasTensor("test", &shape, &type));
- EXPECT_EQ(
- "dim { size: 4 } "
- "dim { size: 5 }",
- shape.DebugString());
+ EXPECT_EQ("[4,5]", shape.DebugString());
EXPECT_EQ(DT_FLOAT, type);
EXPECT_FALSE(reader.HasTensor("don't exist", nullptr, nullptr));
}
@@ -242,10 +239,7 @@ void SimpleIntXHelper(TensorSliceWriter::CreateBuilderFunction create_function,
TensorShape shape;
DataType type;
EXPECT_TRUE(reader.HasTensor("test", &shape, &type));
- EXPECT_EQ(
- "dim { size: 4 } "
- "dim { size: 5 }",
- shape.DebugString());
+ EXPECT_EQ("[4,5]", shape.DebugString());
EXPECT_EQ(DataTypeToEnum<T>::v(), type);
EXPECT_FALSE(reader.HasTensor("don't exist", nullptr, nullptr));
}
@@ -379,10 +373,7 @@ void CachedTensorSliceReaderTesterHelper(
TensorShape shape;
DataType type;
EXPECT_TRUE(reader->HasTensor("test", &shape, &type));
- EXPECT_EQ(
- "dim { size: 4 } "
- "dim { size: 5 }",
- shape.DebugString());
+ EXPECT_EQ("[4,5]", shape.DebugString());
EXPECT_EQ(DT_FLOAT, type);
EXPECT_FALSE(reader->HasTensor("don't exist", nullptr, nullptr));
}