MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / TEST_P

Function TEST_P

tools/cel_unparser_test.cc:47–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 : public testing::TestWithParam<UnparserTestCaseTextProto> {};
46
47TEST_P(UnparserTestTextProto, Test) {
48 auto test_case = GetParam();
49 Expr expr;
50 ASSERT_TRUE(google::protobuf::TextFormat::ParseFromString(test_case.proto_text, &expr));
51 absl::StatusOr<std::string> result = Unparse(expr);
52 if (result.ok()) {
53 ASSERT_OK(test_case.expr);
54 ASSERT_EQ(*(test_case.expr), *result);
55 } else {
56 ASSERT_THAT(result.status(),
57 StatusIs(test_case.expr.status().code(),
58 HasSubstr(test_case.expr.status().message())));
59 }
60}
61
62// these tests make explicit assumptions about specific proto structures
63// that are to be observed

Callers

nothing calls this directly

Calls 4

UnparseFunction · 0.85
codeMethod · 0.80
messageMethod · 0.80
okMethod · 0.45

Tested by

no test coverage detected