aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/crop_and_resize_op_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-06 12:37:17 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-06 12:41:28 -0700
commite8dedc2c0f00dd28a3398cceb5e3293faaabbb9f (patch)
treeabfc4ba2b1d35604b91da565c54cb599ba261b75 /tensorflow/core/kernels/crop_and_resize_op_test.cc
parentaeb23e74a2613e573a4cebf3a8314b8e2d1a3b34 (diff)
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents. This will allow the deprecated methods to be removed. PiperOrigin-RevId: 191925087
Diffstat (limited to 'tensorflow/core/kernels/crop_and_resize_op_test.cc')
-rw-r--r--tensorflow/core/kernels/crop_and_resize_op_test.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/tensorflow/core/kernels/crop_and_resize_op_test.cc b/tensorflow/core/kernels/crop_and_resize_op_test.cc
index a35e1b0788..709082e799 100644
--- a/tensorflow/core/kernels/crop_and_resize_op_test.cc
+++ b/tensorflow/core/kernels/crop_and_resize_op_test.cc
@@ -26,6 +26,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test.h"
namespace tensorflow {
@@ -242,7 +243,7 @@ TEST_F(CropAndResizeOpTest, TestInvalidInputShape) {
AddInputFromArray<int32>(TensorShape({2}), {4, 4});
Status s = RunOpKernel();
ASSERT_FALSE(s.ok());
- EXPECT_TRUE(StringPiece(s.ToString()).contains("input image must be 4-D"))
+ EXPECT_TRUE(str_util::StrContains(s.ToString(), "input image must be 4-D"))
<< s;
}
@@ -255,7 +256,7 @@ TEST_F(CropAndResizeOpTest, TestInvalidBoxIndexShape) {
Status s = RunOpKernel();
ASSERT_FALSE(s.ok());
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("box_index has incompatible shape"))
+ str_util::StrContains(s.ToString(), "box_index has incompatible shape"))
<< s;
}
@@ -267,8 +268,8 @@ TEST_F(CropAndResizeOpTest, TestInvalidBoxIndex) {
AddInputFromArray<int32>(TensorShape({2}), {3, 3});
Status s = RunOpKernel();
ASSERT_FALSE(s.ok());
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("box_index has values outside [0, batch_size)"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "box_index has values outside [0, batch_size)"))
<< s;
}