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

Function ExpectInvalidSyntax

tensorflow/core/framework/node_def_util_test.cc:265–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void ExpectInvalidSyntax(const NodeDef& bad, const string& message) {
266 Status status = ValidateExternalNodeDefSyntax(bad);
267
268 ASSERT_FALSE(status.ok()) << "NodeDef: " << SummarizeNodeDef(bad);
269
270 EXPECT_TRUE(errors::IsInvalidArgument(status))
271 << status << "; NodeDef: " << SummarizeNodeDef(bad);
272
273 EXPECT_TRUE(absl::StrContains(StringPiece(status.ToString()), message))
274 << "NodeDef: " << SummarizeNodeDef(bad) << ", " << status << ", "
275 << message;
276}
277
278TEST(NodeDefUtilTest, ValidSyntax) {
279 const NodeDef node_def = ToNodeDef(R"proto(

Callers 1

TESTFunction · 0.85

Calls 5

SummarizeNodeDefFunction · 0.85
StrContainsFunction · 0.50
okMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected