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

Function TEST_P

parser/standard_macros_test.cc:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40using StandardMacrosTest = ::testing::TestWithParam<StandardMacrosTestCase>;
41
42TEST_P(StandardMacrosTest, Errors) {
43 const auto& test_param = GetParam();
44 ASSERT_OK_AND_ASSIGN(auto source, NewSource(test_param.expression));
45
46 ParserOptions options;
47 options.enable_optional_syntax = true;
48
49 MacroRegistry registry;
50 ASSERT_THAT(RegisterStandardMacros(registry, options), IsOk());
51
52 EXPECT_THAT(EnrichedParse(*source, registry, options),
53 StatusIs(absl::StatusCode::kInvalidArgument,
54 HasSubstr(test_param.error)));
55}
56
57INSTANTIATE_TEST_SUITE_P(
58 StandardMacrosTest, StandardMacrosTest,

Callers

nothing calls this directly

Calls 2

RegisterStandardMacrosFunction · 0.85
EnrichedParseFunction · 0.85

Tested by

no test coverage detected