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

Function TEST

tensorflow/core/common_runtime/session_test.cc:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace {
25
26TEST(SessionTest, InvalidTargetReturnsNull) {
27 SessionOptions options;
28 options.target = "invalid target";
29
30 EXPECT_EQ(nullptr, tensorflow::NewSession(options));
31
32 Session* session;
33 Status s = tensorflow::NewSession(options, &session);
34 EXPECT_EQ(s.code(), error::NOT_FOUND);
35 EXPECT_TRUE(absl::StrContains(
36 s.error_message(),
37 "No session factory registered for the given session options"));
38}
39
40// Register a fake session factory to test error handling paths in
41// NewSession().

Callers

nothing calls this directly

Calls 3

NewSessionFunction · 0.70
StrContainsFunction · 0.50
codeMethod · 0.45

Tested by

no test coverage detected