diff options
author | 2017-02-13 15:34:58 -0800 | |
---|---|---|
committer | 2017-02-13 17:24:58 -0800 | |
commit | bc225bfaa534acc25047fe844f19edc333b7a76a (patch) | |
tree | fa76941d893ad2e31d0961194c68893a4dc29c5a /tensorflow/core/example | |
parent | d065a5d984794a0e59bc1787010ef4b911d4ef89 (diff) |
Fix code that ignores tensorflow::Status.
Add a new tensorflow::Status::IgnoreError() method to mark call sites where a Status has been intentionally ignored.
Change: 147402405
Diffstat (limited to 'tensorflow/core/example')
-rw-r--r-- | tensorflow/core/example/example_parser_configuration_test.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/core/example/example_parser_configuration_test.cc b/tensorflow/core/example/example_parser_configuration_test.cc index 0fa772bd6b..6206d2bd51 100644 --- a/tensorflow/core/example/example_parser_configuration_test.cc +++ b/tensorflow/core/example/example_parser_configuration_test.cc @@ -16,6 +16,7 @@ limitations under the License. #include "tensorflow/core/example/example.pb.h" #include "tensorflow/core/framework/tensor_testutil.h" +#include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/lib/io/path.h" #include "tensorflow/core/platform/protobuf.h" #include "tensorflow/core/platform/test.h" @@ -44,7 +45,7 @@ class ExtractExampleParserConfigurationTest : public ::testing::Test { ReadFileToStringOrDie(Env::Default(), filename, &proto_string); protobuf::TextFormat::ParseFromString(proto_string, &graph_def_); session_.reset(CreateSession()); - session_->Create(graph_def_); + TF_CHECK_OK(session_->Create(graph_def_)); } NodeDef* parse_example_node() { @@ -194,8 +195,8 @@ class ExampleParserConfigurationProtoToFeatureVectorsTest TEST_F(ExampleParserConfigurationProtoToFeatureVectorsTest, Basic) { std::vector<FixedLenFeature> fixed_len_features; std::vector<VarLenFeature> var_len_features; - ExampleParserConfigurationProtoToFeatureVectors( - config_proto_, &fixed_len_features, &var_len_features); + TF_ASSERT_OK(ExampleParserConfigurationProtoToFeatureVectors( + config_proto_, &fixed_len_features, &var_len_features)); ASSERT_EQ(1, fixed_len_features.size()); ASSERT_EQ(1, var_len_features.size()); |