diff options
author | 2018-04-02 10:50:09 -0700 | |
---|---|---|
committer | 2018-04-02 10:52:29 -0700 | |
commit | 82bb63b958f5e39fb57ad45147b7d2c662c9b06c (patch) | |
tree | 334b52ad4b5c75c92ae86307a6d5076e9f645741 /tensorflow/core/framework/op_compatibility_test.cc | |
parent | 3edab0abb1213f88507692042a320abc695ff674 (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: 191314576
Diffstat (limited to 'tensorflow/core/framework/op_compatibility_test.cc')
-rw-r--r-- | tensorflow/core/framework/op_compatibility_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/core/framework/op_compatibility_test.cc b/tensorflow/core/framework/op_compatibility_test.cc index b57bdcb841..c782480f1f 100644 --- a/tensorflow/core/framework/op_compatibility_test.cc +++ b/tensorflow/core/framework/op_compatibility_test.cc @@ -22,6 +22,7 @@ limitations under the License. #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/types.h" #include "tensorflow/core/kernels/ops_testutil.h" +#include "tensorflow/core/lib/strings/str_util.h" #include "tensorflow/core/platform/test.h" namespace tensorflow { @@ -96,7 +97,7 @@ class OpCompatibilityTest : public OpsTestBase { ADD_FAILURE() << SummarizeOpDef(old_op_def) << " vs. " << SummarizeOpDef(new_op_def); } else { - EXPECT_TRUE(StringPiece(status.error_message()).contains(error)) + EXPECT_TRUE(str_util::StrContains(status.error_message(), error)) << status << " does not contain " << error; } } @@ -118,7 +119,7 @@ class OpCompatibilityTest : public OpsTestBase { ADD_FAILURE() << SummarizeNodeDef(*node_def()); } else { EXPECT_TRUE( - StringPiece(status.error_message()).contains(validation_error)) + str_util::StrContains(status.error_message(), validation_error)) << status << " does not contain " << validation_error; } @@ -179,7 +180,7 @@ class OpCompatibilityTest : public OpsTestBase { << SummarizeOpDef(*new_op_def); } else { EXPECT_TRUE( - StringPiece(status.error_message()).contains(compatibility_error)) + str_util::StrContains(status.error_message(), compatibility_error)) << status << " does not contain " << compatibility_error; } } |