| 22 | namespace { |
| 23 | |
| 24 | TEST(StatusHelper, TestStatusHelper) { |
| 25 | TF_Status* s = TF_NewStatus(); |
| 26 | Status cc_status(errors::InvalidArgument("some error")); |
| 27 | Set_TF_Status_from_Status(s, cc_status); |
| 28 | ASSERT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(s)); |
| 29 | ASSERT_EQ(std::string("some error"), TF_Message(s)); |
| 30 | |
| 31 | Status another_cc_status(StatusFromTF_Status(s)); |
| 32 | ASSERT_FALSE(another_cc_status.ok()); |
| 33 | ASSERT_EQ(std::string("some error"), another_cc_status.error_message()); |
| 34 | ASSERT_EQ(error::INVALID_ARGUMENT, another_cc_status.code()); |
| 35 | TF_DeleteStatus(s); |
| 36 | } |
| 37 | |
| 38 | } // namespace |
| 39 | } // namespace tensorflow |
nothing calls this directly
no test coverage detected