MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/c/tf_status_helper_test.cc:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace {
23
24TEST(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

Callers

nothing calls this directly

Calls 9

TF_NewStatusFunction · 0.85
InvalidArgumentFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
StatusFromTF_StatusFunction · 0.85
TF_DeleteStatusFunction · 0.85
okMethod · 0.45
codeMethod · 0.45

Tested by

no test coverage detected