| 75 | using LegacyActivation = google::api::expr::runtime::Activation; |
| 76 | |
| 77 | TEST(RegexExtTest, BuildFailsWithoutOptionalSupport) { |
| 78 | RuntimeOptions options; |
| 79 | options.enable_regex = true; |
| 80 | options.enable_qualified_type_identifiers = true; |
| 81 | |
| 82 | ASSERT_OK_AND_ASSIGN(auto builder, |
| 83 | CreateStandardRuntimeBuilder( |
| 84 | internal::GetTestingDescriptorPool(), options)); |
| 85 | ASSERT_THAT( |
| 86 | EnableReferenceResolver(builder, ReferenceResolverEnabled::kAlways), |
| 87 | IsOk()); |
| 88 | // Optional types are NOT enabled. |
| 89 | ASSERT_THAT(RegisterRegexExtensionFunctions(builder), |
| 90 | StatusIs(absl::StatusCode::kInvalidArgument, |
| 91 | HasSubstr("regex extensions requires the optional types " |
| 92 | "to be enabled"))); |
| 93 | } |
| 94 | |
| 95 | TEST(RegexExtTest, LegacyRuntimeSmokeTest) { |
| 96 | InterpreterOptions options; |
nothing calls this directly
no test coverage detected