| 69 | class 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)); |
nothing calls this directly
no test coverage detected