diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-08-11 14:46:25 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-08-11 16:02:59 -0700 |
commit | cf93b043a88607db17b84b5b5d3f0064473cf5ce (patch) | |
tree | d3d82a7404a0788874d9252e45950835517c2511 /tensorflow/core/ops/image_ops_test.cc | |
parent | d6485c1f0f56e5a060aefc264c75c08a718663e2 (diff) |
Add C++ shape inference functions for ParseExample and
ParseSingleSequenceExample.
The attribute parsing code was moved over verbatim to example_proto_helper.*.
Change TF_CHECK_OK to TF_ASSERT_OK in all shape inference tests under core.
Change: 130041336
Diffstat (limited to 'tensorflow/core/ops/image_ops_test.cc')
-rw-r--r-- | tensorflow/core/ops/image_ops_test.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tensorflow/core/ops/image_ops_test.cc b/tensorflow/core/ops/image_ops_test.cc index fc9640ffb4..1b5db82ab8 100644 --- a/tensorflow/core/ops/image_ops_test.cc +++ b/tensorflow/core/ops/image_ops_test.cc @@ -18,6 +18,7 @@ limitations under the License. #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/shape_inference_testutil.h" #include "tensorflow/core/framework/tensor_testutil.h" +#include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/platform/test.h" namespace tensorflow { @@ -61,17 +62,17 @@ TEST(ImageOpsTest, DecodeImage_ShapeFn) { INFER_OK(op, "[]", "[?,?,?]"); // Set the channel and so that part of output shape is known. - TF_CHECK_OK(NodeDefBuilder("test", op_name) - .Input({"a", 0, DT_STRING}) - .Attr("channels", 4) - .Finalize(&op.node_def)); + TF_ASSERT_OK(NodeDefBuilder("test", op_name) + .Input({"a", 0, DT_STRING}) + .Attr("channels", 4) + .Finalize(&op.node_def)); INFER_OK(op, "[]", "[?,?,4]"); // Negative channel value is rejected. - TF_CHECK_OK(NodeDefBuilder("test", op_name) - .Input({"a", 0, DT_STRING}) - .Attr("channels", -1) - .Finalize(&op.node_def)); + TF_ASSERT_OK(NodeDefBuilder("test", op_name) + .Input({"a", 0, DT_STRING}) + .Attr("channels", -1) + .Finalize(&op.node_def)); INFER_ERROR("channels must be non-negative, got -1", op, "[]"); } } |