aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/tests/compute_constant_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/compiler/xla/tests/compute_constant_test.cc')
-rw-r--r--tensorflow/compiler/xla/tests/compute_constant_test.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/tests/compute_constant_test.cc b/tensorflow/compiler/xla/tests/compute_constant_test.cc
index ec2c580670..e5a03b49ad 100644
--- a/tensorflow/compiler/xla/tests/compute_constant_test.cc
+++ b/tensorflow/compiler/xla/tests/compute_constant_test.cc
@@ -31,6 +31,7 @@ limitations under the License.
#include "tensorflow/compiler/xla/tests/test_macros.h"
#include "tensorflow/compiler/xla/tests/test_utils.h"
#include "tensorflow/compiler/xla/xla_data.pb.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/types.h"
namespace xla {
@@ -167,8 +168,8 @@ TEST_F(ComputeConstantTest, DirectParamMissing) {
EXPECT_FALSE(IsConstant(computation, &b));
auto value = ComputeConstantScalar<float>(client, computation, &b);
- EXPECT_TRUE(tensorflow::StringPiece(value.status().ToString())
- .contains("depends on a parameter"))
+ EXPECT_TRUE(tensorflow::str_util::StrContains(value.status().ToString(),
+ "depends on a parameter"))
<< value.status();
}
}
@@ -183,8 +184,8 @@ TEST_F(ComputeConstantTest, IndirectParamMissing) {
EXPECT_FALSE(IsConstant(computation, &b));
auto value = ComputeConstantScalar<float>(client, computation, &b);
- EXPECT_TRUE(tensorflow::StringPiece(value.status().ToString())
- .contains("depends on a parameter"))
+ EXPECT_TRUE(tensorflow::str_util::StrContains(value.status().ToString(),
+ "depends on a parameter"))
<< value.status();
}
}