aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/cloud
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-03-27 12:00:44 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-27 12:03:22 -0700
commitfd77211de17bf053cc8f5a82c8eff1818451120c (patch)
tree9375474620e8129f220d741b6407692a06554f70 /tensorflow/contrib/cloud
parentaec2496567a7bfd508fc487dec474263b6a7481f (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: 190650553
Diffstat (limited to 'tensorflow/contrib/cloud')
-rw-r--r--tensorflow/contrib/cloud/kernels/BUILD1
-rw-r--r--tensorflow/contrib/cloud/kernels/bigquery_table_accessor_test.cc5
2 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/contrib/cloud/kernels/BUILD b/tensorflow/contrib/cloud/kernels/BUILD
index 56f930a9a8..d5fc604de9 100644
--- a/tensorflow/contrib/cloud/kernels/BUILD
+++ b/tensorflow/contrib/cloud/kernels/BUILD
@@ -73,6 +73,7 @@ tf_cc_test(
],
deps = [
":bigquery_table_accessor",
+ "//tensorflow/core:lib",
"//tensorflow/core:lib_internal",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
diff --git a/tensorflow/contrib/cloud/kernels/bigquery_table_accessor_test.cc b/tensorflow/contrib/cloud/kernels/bigquery_table_accessor_test.cc
index e9b79a066d..7416eb19d3 100644
--- a/tensorflow/contrib/cloud/kernels/bigquery_table_accessor_test.cc
+++ b/tensorflow/contrib/cloud/kernels/bigquery_table_accessor_test.cc
@@ -18,6 +18,7 @@ limitations under the License.
#include "tensorflow/core/example/feature.pb.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/gtl/stl_util.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/cloud/http_request_fake.h"
#include "tensorflow/core/platform/test.h"
@@ -28,8 +29,8 @@ constexpr char kTestProject[] = "test-project";
constexpr char kTestDataset[] = "test-dataset";
constexpr char kTestTable[] = "test-table";
-bool HasSubstr(const string& base, const string& substr) {
- bool ok = StringPiece(base).contains(substr);
+bool HasSubstr(StringPiece base, StringPiece substr) {
+ bool ok = str_util::StrContains(base, substr);
EXPECT_TRUE(ok) << base << ", expected substring " << substr;
return ok;
}