aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/ops/image_ops_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-08-11 14:46:25 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-08-11 16:02:59 -0700
commitcf93b043a88607db17b84b5b5d3f0064473cf5ce (patch)
treed3d82a7404a0788874d9252e45950835517c2511 /tensorflow/core/ops/image_ops_test.cc
parentd6485c1f0f56e5a060aefc264c75c08a718663e2 (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.cc17
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, "[]");
}
}