diff --git a/tensorflow/cc/framework/cc_ops_test.cc b/tensorflow/cc/framework/cc_ops_test.cc index ac05e3cf95b..178b4da972a 100644 --- a/tensorflow/cc/framework/cc_ops_test.cc +++ b/tensorflow/cc/framework/cc_ops_test.cc @@ -200,10 +200,10 @@ TEST(CCOpTest, TemplatedConst) { test::ExpectTensorEqual( out, test::AsTensor({3.f, 2.f, -1.f, 0.f}, {2, 2})); - auto c2 = ops::Const(root, {{"this"}, {"is"}, {"a"}, {"constant"}}); + auto c2 = ops::Const(root, {{"this"}, {"is"}, {"a"}, {"constant"}}); test::GetTensor(root, c2, &out); - test::ExpectTensorEqual( - out, test::AsTensor({"this", "is", "a", "constant"}, {4, 1})); + test::ExpectTensorEqual( + out, test::AsTensor({"this", "is", "a", "constant"}, {4, 1})); } TEST(CCOpTest, EmptyConst) { diff --git a/tensorflow/cc/framework/ops.h b/tensorflow/cc/framework/ops.h index 0717e7dd4b3..1414e861002 100644 --- a/tensorflow/cc/framework/ops.h +++ b/tensorflow/cc/framework/ops.h @@ -111,7 +111,7 @@ class Input { Initializer(const T& v) { // NOLINT(runtime/explicit) typedef typename RealType::type RealT; Tensor t(DataTypeToEnum::v(), TensorShape()); - t.flat()(0) = RealT(v); + t.flat()(0) = RealT(v); tensor = t; } @@ -125,7 +125,7 @@ class Input { typedef typename RealType::type RealT; Tensor t(DataTypeToEnum::v(), shape); for (int64 i = 0; i < t.NumElements(); ++i) { - t.flat()(i) = RealT(v); + t.flat()(i) = RealT(v); } tensor = t; } @@ -170,7 +170,7 @@ class Input { // START_SKIP_DOXYGEN template ::value> struct RealType { - typedef string type; + typedef tstring type; }; template diff --git a/tensorflow/cc/ops/const_op_test.cc b/tensorflow/cc/ops/const_op_test.cc index 69b5d7fd47c..345cd23b9ec 100644 --- a/tensorflow/cc/ops/const_op_test.cc +++ b/tensorflow/cc/ops/const_op_test.cc @@ -97,7 +97,7 @@ TEST(ConstOpTest, WithExplicitShape) { auto d = ops::Const(root, {"1", "2", "3", "4", "5", "6"}, {2, 3}); TF_CHECK_OK(root.status()); EXPECT_EQ(d.op().output_type(0), DT_STRING); - ExpectNodeEqual(d.node(), {"1", "2", "3", "4", "5", "6"}, {2, 3}); + ExpectNodeEqual(d.node(), {"1", "2", "3", "4", "5", "6"}, {2, 3}); } TEST(ConstOpTest, FromProto) { @@ -144,7 +144,7 @@ TEST(ConstOpTest, TemplatedConst) { auto c1 = ops::Const(root, {1, 2}); ExpectTypeAndShape(c1.node(), DT_INT32, {2}); - auto c2 = ops::Const(root, {{"this"}, {"is"}, {"a"}, {"constant"}}); + auto c2 = ops::Const(root, {{"this"}, {"is"}, {"a"}, {"constant"}}); ExpectTypeAndShape(c2.node(), DT_STRING, {4, 1}); } diff --git a/tensorflow/cc/saved_model/loader_test.cc b/tensorflow/cc/saved_model/loader_test.cc index 422994ba07c..aa2031d17d2 100644 --- a/tensorflow/cc/saved_model/loader_test.cc +++ b/tensorflow/cc/saved_model/loader_test.cc @@ -63,8 +63,8 @@ class LoaderTest : public ::testing::Test { bundle.session->Run({}, {"filename_tensor:0"}, {}, &path_outputs)); ASSERT_EQ(1, path_outputs.size()); - test::ExpectTensorEqual( - test::AsTensor({"foo.txt"}, TensorShape({})), path_outputs[0]); + test::ExpectTensorEqual( + test::AsTensor({"foo.txt"}, TensorShape({})), path_outputs[0]); } void CheckSavedModelBundle(const string& export_dir, @@ -78,14 +78,14 @@ class LoaderTest : public ::testing::Test { const string output_name = signature_def.outputs().at(kRegressOutputs).name(); - std::vector serialized_examples; + std::vector serialized_examples; for (float x : {0, 1, 2, 3}) { serialized_examples.push_back(MakeSerializedExample(x)); } // Validate the half plus two behavior. Tensor input = - test::AsTensor(serialized_examples, TensorShape({4})); + test::AsTensor(serialized_examples, TensorShape({4})); std::vector outputs; TF_ASSERT_OK(bundle.session->Run({{input_name, input}}, {output_name}, {}, &outputs));