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

Method SetUp

extensions/regex_functions_test.cc:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69class RegexFunctionsTest : public ::testing::TestWithParam<TestCase> {
70 public:
71 void SetUp() override {
72 RuntimeOptions options;
73 options.enable_regex = true;
74 options.enable_qualified_type_identifiers = true;
75
76 ASSERT_OK_AND_ASSIGN(
77 RuntimeBuilder builder,
78 CreateStandardRuntimeBuilder(descriptor_pool_, options));
79 ASSERT_THAT(
80 EnableReferenceResolver(builder, ReferenceResolverEnabled::kAlways),
81 IsOk());
82 ASSERT_THAT(RegisterRegexFunctions(builder.function_registry(), options),
83 IsOk());
84 ASSERT_OK_AND_ASSIGN(runtime_, std::move(builder).Build());
85 }
86
87 absl::StatusOr<Value> TestEvaluate(const std::string& expr_string) {
88 CEL_ASSIGN_OR_RETURN(auto parsed_expr, Parse(expr_string));

Callers

nothing calls this directly

Calls 4

EnableReferenceResolverFunction · 0.85
RegisterRegexFunctionsFunction · 0.70
ASSERT_OK_AND_ASSIGNFunction · 0.50
BuildMethod · 0.45

Tested by

no test coverage detected