":ops_util",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
+ "//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core:core_cpu",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:framework",
+ "//tensorflow/core:lib",
"//tensorflow/core:tensorflow",
"//tensorflow/core:test",
"//tensorflow/core:test_main",
#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 {
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;
}
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;
}
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;
}
// Classify the contents of a file based on starting bytes (the magic number).
FileFormat ClassifyFileFormat(StringPiece data) {
// The 4th byte of JPEG is '\xe0' or '\xe1', so check just the first three
- if (data.starts_with("\xff\xd8\xff")) return kJpgFormat;
- if (data.starts_with("\x89PNG\r\n\x1a\n")) return kPngFormat;
- if (data.starts_with("\x47\x49\x46\x38")) return kGifFormat;
+ if (str_util::StartsWith(data, "\xff\xd8\xff")) return kJpgFormat;
+ if (str_util::StartsWith(data, "\x89PNG\r\n\x1a\n")) return kPngFormat;
+ if (str_util::StartsWith(data, "\x47\x49\x46\x38")) return kGifFormat;
return kUnknownFormat;
}
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/random/simple_philox.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14});
AddInputFromArray<int32>(TensorShape({5}), {0, 2, 99, 2, 2});
Status s = RunOpKernel();
- EXPECT_TRUE(
- StringPiece(s.ToString()).contains("partitions[2] = 99 is not in [0, 4)"))
+ EXPECT_TRUE(str_util::StrContains(s.ToString(),
+ "partitions[2] = 99 is not in [0, 4)"))
<< s;
}
#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/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/test.h"
AddInputFromArray<float>(TensorShape({3}), {0, 40, 70});
AddInputFromArray<float>(TensorShape({5}), {10, 60, 20, 30, 50});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("data[1].shape = [5] does not start with "
- "indices[1].shape = [1,5]"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(),
+ "data[1].shape = [5] does not start with indices[1].shape = [1,5]"))
<< s;
}
AddInputFromArray<float>(TensorShape({3}), {0, 40, 70});
AddInputFromArray<float>(TensorShape({1, 5}), {10, 60, 20, 30, 50});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("data[1].shape = [1,5] does not start with "
- "indices[1].shape = [5]"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(),
+ "data[1].shape = [1,5] does not start with indices[1].shape = [5]"))
<< s;
}
AddInputFromArray<float>(TensorShape({4, 2}),
{10, 11, 60, 61, 20, 21, 30, 31});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Need data[0].shape[1:] = data[1].shape[1:], "
- "got data[0].shape = [3,1], data[1].shape = [4,2]"))
+ EXPECT_TRUE(
+ str_util::StrContains(s.ToString(),
+ "Need data[0].shape[1:] = data[1].shape[1:], got "
+ "data[0].shape = [3,1], data[1].shape = [4,2]"))
<< s;
}
AddInputFromArray<float>(TensorShape({3}), {0, 40, 70});
AddInputFromArray<float>(TensorShape({4}), {10, 60, 20, 30});
Status s = RunOpKernel();
- EXPECT_TRUE(
- StringPiece(s.ToString())
- .contains(
- "data[1].shape = [4] does not start with indices[1].shape = [5]"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(),
+ "data[1].shape = [4] does not start with indices[1].shape = [5]"))
<< s;
}
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/lib/random/simple_philox.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
AddInputFromArray<int32>(TensorShape({}), {0});
Status s = RunOpKernel();
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("indices[2] = 99 is not in [0, 5)"))
+ str_util::StrContains(s.ToString(), "indices[2] = 99 is not in [0, 5)"))
<< s;
}
#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 {
ASSERT_FALSE(s.ok());
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("scores has incompatible shape"))
+ str_util::StrContains(s.ToString(), "scores has incompatible shape"))
<< s;
}
ASSERT_FALSE(s.ok());
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("iou_threshold must be in [0, 1]"))
+ str_util::StrContains(s.ToString(), "iou_threshold must be in [0, 1]"))
<< s;
}
ASSERT_FALSE(s.ok());
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("scores has incompatible shape"))
+ str_util::StrContains(s.ToString(), "scores has incompatible shape"))
<< s;
}
ASSERT_FALSE(s.ok());
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("iou_threshold must be in [0, 1]"))
+ str_util::StrContains(s.ToString(), "iou_threshold must be in [0, 1]"))
<< s;
}
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
AddInputFromArray<float>(TensorShape({}), {0.0}); // Max
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Invalid range: input_min 1 > input_max 0"))
+ EXPECT_TRUE(str_util::StrContains(s.ToString(),
+ "Invalid range: input_min 1 > input_max 0"))
<< s;
}
AddInputFromArray<int32>(TensorShape({}), {8}); // num_bits
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Invalid range: input_min 1 > input_max 0"))
+ EXPECT_TRUE(str_util::StrContains(s.ToString(),
+ "Invalid range: input_min 1 > input_max 0"))
<< s;
}
#include "tensorflow/core/kernels/remote_fused_graph_execute_op_test_utils.h"
#include "tensorflow/core/kernels/remote_fused_graph_execute_utils.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/tools/graph_transforms/transform_utils.h"
int cluster_count = 0;
for (const NodeDef& node_def : output_graph_def_.node()) {
const string& name = node_def.name();
- if (StringPiece(name).starts_with(REMOTE_FUSED_GRAPH_NODE_NAME)) {
+ if (str_util::StartsWith(name, REMOTE_FUSED_GRAPH_NODE_NAME)) {
++cluster_count;
RemoteFusedGraphExecuteInfo info;
string serialized_proto;
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/kernels/ops_testutil.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
AddInputFromArray<int32>(TensorShape({2}), {0, 0});
Status s = RunOpKernel();
- EXPECT_TRUE(
- StringPiece(s.ToString())
- .contains("Invalid argument: output dimensions must be positive"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "Invalid argument: output dimensions must be positive"))
<< s;
}
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/random/random.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test.h"
namespace tensorflow {
AddInputFromArray<float>(TensorShape({1, 2, 2, 1}), {1, 2, 3, 4});
AddInputFromArray<int32>(TensorShape({2}), {0, 0});
Status s = RunOpKernel();
- EXPECT_TRUE(
- StringPiece(s.ToString())
- .contains("Invalid argument: output dimensions must be positive"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "Invalid argument: output dimensions must be positive"))
<< s;
}
AddInputFromArray<float>(TensorShape({2, 2, 1}), {1, 2, 3, 4});
AddInputFromArray<int32>(TensorShape({2}), {4, 4});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Invalid argument: input must be 4-dimensional"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "Invalid argument: input must be 4-dimensional"))
<< s;
}
AddInputFromArray<float>(TensorShape({1, 2, 2, 1}), {1, 2, 3, 4});
AddInputFromArray<int32>(TensorShape({2, 1}), {4, 4});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Invalid argument: shape_t must be 1-dimensional"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "Invalid argument: shape_t must be 1-dimensional"))
<< s;
}
AddInputFromArray<float>(TensorShape({1, 2, 2, 1}), {1, 2, 3, 4});
AddInputFromArray<int32>(TensorShape({3}), {4, 4, 1});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Invalid argument: shape_t must have two elements"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "Invalid argument: shape_t must have two elements"))
<< s;
}
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/io/path.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
AddInputFromArray<int32>(TensorShape({}), {1});
AddInputFromArray<int32>(TensorShape({}), {0});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString()).contains("input must be 1-D or higher"))
+ EXPECT_TRUE(
+ str_util::StrContains(s.ToString(), "input must be 1-D or higher"))
<< s;
}
AddInputFromArray<int32>(TensorShape({}), {1});
AddInputFromArray<int32>(TensorShape({1, 2}), {0, 1});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("axis must be a scalar or a 1-D vector"))
+ EXPECT_TRUE(str_util::StrContains(s.ToString(),
+ "axis must be a scalar or a 1-D vector"))
<< s;
}
AddInputFromArray<int32>(TensorShape({1, 2}), {0, 1});
AddInputFromArray<int32>(TensorShape({}), {1});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("shift must be a scalar or a 1-D vector"))
+ EXPECT_TRUE(str_util::StrContains(s.ToString(),
+ "shift must be a scalar or a 1-D vector"))
<< s;
}
AddInputFromArray<int32>(TensorShape({1}), {1});
AddInputFromArray<int32>(TensorShape({2}), {0, 1});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("shift and axis must have the same size"))
+ EXPECT_TRUE(str_util::StrContains(s.ToString(),
+ "shift and axis must have the same size"))
<< s;
}
AddInputFromArray<int32>(TensorShape({}), {1});
AddInputFromArray<int32>(TensorShape({}), {1});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString()).contains("is out of range")) << s;
+ EXPECT_TRUE(str_util::StrContains(s.ToString(), "is out of range")) << s;
}
// isd - (inner shift dimension) The inner most dimension to be shifted.
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/random/simple_philox.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
AddInputFromArray<float>(TensorShape({3, 3}),
{100, 101, 102, 777, 778, 779, 10000, 10001, 10002});
Status s = RunOpKernel();
- EXPECT_TRUE(
- StringPiece(s.ToString())
- .contains("Invalid indices: [2,0] = [99] does not index into [5,3]"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "Invalid indices: [2,0] = [99] does not index into [5,3]"))
<< s;
}
AddInputFromArray<float>(TensorShape({3, 3}),
{100, 101, 102, 777, 778, 779, 10000, 10001, 10002});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("The outermost dimension of updates and indices "
- "must match. Got indices.shape [1,3,1], "
- "updates.shape [3,3]"))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(),
+ "The outermost dimension of updates and indices must match. Got "
+ "indices.shape [1,3,1], updates.shape [3,3]"))
<< s;
}
TensorShape({3, 4}),
{100, 101, 102, 103, 777, 778, 779, 780, 10000, 10001, 10002, 10004});
Status s = RunOpKernel();
- EXPECT_TRUE(
- StringPiece(s.ToString())
- .contains("Must have updates.shape = indices.shape[:batch_dim]"))
-
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(), "Must have updates.shape = indices.shape[:batch_dim]"))
<< s;
}
AddInputFromArray<float>(TensorShape({2, 3}),
{100, 101, 102, 10000, 10001, 10002});
Status s = RunOpKernel();
- EXPECT_TRUE(
- StringPiece(s.ToString())
- .contains(
- "The outermost dimension of updates and indices must match."))
+ EXPECT_TRUE(str_util::StrContains(
+ s.ToString(),
+ "The outermost dimension of updates and indices must match."))
<< s;
}
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/random/simple_philox.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
{100, 101, 102, 777, 778, 779, 10000, 10001, 10002});
Status s = RunOpKernel();
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("indices[2] = 99 is not in [0, 5)"))
+ str_util::StrContains(s.ToString(), "indices[2] = 99 is not in [0, 5)"))
<< s;
}
AddInputFromArray<float>(TensorShape({3, 3}),
{100, 101, 102, 777, 778, 779, 10000, 10001, 10002});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Must have updates.shape = indices.shape + "
+ EXPECT_TRUE(
+ str_util::StrContains(s.ToString(),
+ "Must have updates.shape = indices.shape + "
"params.shape[1:] or updates.shape = [], got "))
<< s;
}
TensorShape({3, 4}),
{100, 101, 102, 103, 777, 778, 779, 780, 10000, 10001, 10002, 10004});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Must have updates.shape = indices.shape + "
+ EXPECT_TRUE(
+ str_util::StrContains(s.ToString(),
+ "Must have updates.shape = indices.shape + "
"params.shape[1:] or updates.shape = [], got "))
<< s;
AddInputFromArray<float>(TensorShape({2, 3}),
{100, 101, 102, 10000, 10001, 10002});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString())
- .contains("Must have updates.shape = indices.shape + "
+ EXPECT_TRUE(
+ str_util::StrContains(s.ToString(),
+ "Must have updates.shape = indices.shape + "
"params.shape[1:] or updates.shape = [], got "))
<< s;
}
#include "tensorflow/core/framework/variant_op_registry.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/types.h"
REGISTER_UNARY_VARIANT_SHAPE_FUNCTION(KnownVecSize, "KNOWN VECTOR SIZE TYPE",
GetShapeFromKnownVecSize);
-static void ExpectHasError(const Status& s, const string& substr) {
- EXPECT_TRUE(StringPiece(s.ToString()).contains(substr))
+static void ExpectHasError(const Status& s, StringPiece substr) {
+ EXPECT_TRUE(str_util::StrContains(s.ToString(), substr))
<< ">>" << s << "<<, expected substring >>" << substr << "<<";
}
// See docs in ../ops/nn_ops.cc.
+#include "tensorflow/core/lib/strings/str_util.h"
#define EIGEN_USE_THREADS
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
class SoftmaxOp : public OpKernel {
public:
explicit SoftmaxOp(OpKernelConstruction* context) : OpKernel(context) {
- log_ = StringPiece(type_string()).starts_with("Log");
+ log_ = str_util::StartsWith(type_string(), "Log");
}
void Compute(OpKernelContext* context) override {
limitations under the License.
==============================================================================*/
+#include "tensorflow/core/lib/strings/str_util.h"
#if GOOGLE_CUDA
#define EIGEN_USE_GPU
class SoftmaxOpGPU : public OpKernel {
public:
explicit SoftmaxOpGPU(OpKernelConstruction* context) : OpKernel(context) {
- log_ = StringPiece(type_string()).starts_with("Log");
+ log_ = str_util::StartsWith(type_string(), "Log");
}
void Compute(OpKernelContext* context) override {
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/kernels/ops_testutil.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace {
static void ExpectHasSubstr(StringPiece s, StringPiece expected) {
- EXPECT_TRUE(StringPiece(s).contains(expected))
+ EXPECT_TRUE(str_util::StrContains(s, expected))
<< "'" << s << "' does not contain '" << expected << "'";
}
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/histogram/histogram.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/logging.h"
AddInputFromArray<string>(TensorShape({2}), {"tag1", "tag2"});
AddInputFromArray<float>(TensorShape({3}), {1.0f, -0.73f, 10000.0f});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString()).contains("not the same shape")) << s;
+ EXPECT_TRUE(str_util::StrContains(s.ToString(), "not the same shape")) << s;
}
TEST_F(SummaryScalarOpTest, Error_WrongDimsTags) {
AddInputFromArray<float>(TensorShape({2}), {1.0f, -0.73f});
Status s = RunOpKernel();
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("tags and values not the same shape"))
+ str_util::StrContains(s.ToString(), "tags and values not the same shape"))
<< s;
}
AddInputFromArray<float>(TensorShape({2, 1}), {1.0f, -0.73f});
Status s = RunOpKernel();
EXPECT_TRUE(
- StringPiece(s.ToString()).contains("tags and values not the same shape"))
+ str_util::StrContains(s.ToString(), "tags and values not the same shape"))
<< s;
}
AddInputFromArray<string>(TensorShape({2, 1}), {"tag1", "tag2"});
AddInputFromArray<float>(TensorShape({2}), {1.0f, -0.73f});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString()).contains("tags must be scalar")) << s;
+ EXPECT_TRUE(str_util::StrContains(s.ToString(), "tags must be scalar")) << s;
}
TEST_F(SummaryHistoOpTest, Error_TooManyTagValues) {
AddInputFromArray<string>(TensorShape({2}), {"tag1", "tag2"});
AddInputFromArray<float>(TensorShape({2, 1}), {1.0f, -0.73f});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString()).contains("tags must be scalar")) << s;
+ EXPECT_TRUE(str_util::StrContains(s.ToString(), "tags must be scalar")) << s;
}
// --------------------------------------------------------------------------
AddInputFromArray<string>(TensorShape({2}),
{s1.SerializeAsString(), s2.SerializeAsString()});
Status s = RunOpKernel();
- EXPECT_TRUE(StringPiece(s.ToString()).contains("Duplicate tag")) << s;
+ EXPECT_TRUE(str_util::StrContains(s.ToString(), "Duplicate tag")) << s;
}
} // namespace