aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/kernels/sparse_reduce_sum_op_test.cc')
-rw-r--r--tensorflow/core/kernels/sparse_reduce_sum_op_test.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc b/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc
index 2fb78a2a21..110376be42 100644
--- a/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc
+++ b/tensorflow/core/kernels/sparse_reduce_sum_op_test.cc
@@ -51,8 +51,10 @@ TEST_F(SparseReduceSumOpTest, SimpleReduce) {
// [3 4]
const auto indices_shape = TensorShape({4, 2});
- const gtl::ArraySlice<int64> indices = {0, 1, 1, 0, 2, 0, 2, 1};
- const gtl::ArraySlice<int64> shape = {3, 2};
+ std::initializer_list<int64> in{ 0, 1, 1, 0, 2, 0, 2, 1 };
+ const gtl::ArraySlice<int64> indices(in);
+ std::initializer_list<int64> sh{ 3, 2 };
+ const gtl::ArraySlice<int64> shape(sh);
AddInputFromArray<int64>(indices_shape, indices);
AddInputFromArray<float>(TensorShape({4}), {1, 2, 3, 4});
@@ -91,8 +93,10 @@ TEST_F(SparseReduceSumSparseOpTest, SimpleReduce) {
// [3 4]
const auto indices_shape = TensorShape({4, 2});
- const gtl::ArraySlice<int64> indices = {0, 1, 1, 0, 2, 0, 2, 1};
- const gtl::ArraySlice<int64> shape = {3, 2};
+ std::initializer_list<int64> in{ 0, 1, 1, 0, 2, 0, 2, 1 };
+ const gtl::ArraySlice<int64> indices(in);
+ std::initializer_list<int64> sh{ 3, 2 };
+ const gtl::ArraySlice<int64> shape(sh);
AddInputFromArray<int64>(indices_shape, indices);
AddInputFromArray<float>(TensorShape({4}), {2, 2, 3, 4});