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

Function TEST_P

checker/standard_library_test.cc:155–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153 public testing::WithParamInterface<std::string> {};
154
155TEST_P(StdlibTypeVarDefinitionTest, DefinesTypeConstants) {
156 auto ast = std::make_unique<Ast>();
157 ast->mutable_root_expr().mutable_ident_expr().set_name(GetParam());
158 ast->mutable_root_expr().set_id(1);
159
160 ASSERT_OK_AND_ASSIGN(ValidationResult result,
161 stdlib_type_checker_->Check(std::move(ast)));
162
163 EXPECT_THAT(result.GetIssues(), IsEmpty());
164 ASSERT_OK_AND_ASSIGN(std::unique_ptr<Ast> checked_ast, result.ReleaseAst());
165 EXPECT_THAT(checked_ast->GetReference(1),
166 Pointee(Property(&Reference::name, GetParam())));
167 EXPECT_THAT(checked_ast->GetTypeOrDyn(1), Property(&AstType::has_type, true));
168}
169
170INSTANTIATE_TEST_SUITE_P(StdlibTypeVarDefinitions, StdlibTypeVarDefinitionTest,
171 ::testing::Values("bool", "bytes", "double", "dyn",

Callers

nothing calls this directly

Calls 12

CreateTypeCheckerBuilderFunction · 0.85
StandardCheckerLibraryFunction · 0.85
MakeTestParsedAstFunction · 0.85
GetIssuesMethod · 0.80
ReleaseAstMethod · 0.80
GetReferenceMethod · 0.80
IsValidMethod · 0.80
ASSERT_OK_AND_ASSIGNFunction · 0.50
set_nameMethod · 0.45
set_idMethod · 0.45
AddLibraryMethod · 0.45
BuildMethod · 0.45

Tested by

no test coverage detected