| 38 | using ::testing::HasSubstr; |
| 39 | |
| 40 | absl::StatusOr<std::unique_ptr<Compiler>> StdLibCompiler() { |
| 41 | CEL_ASSIGN_OR_RETURN( |
| 42 | auto builder, |
| 43 | NewCompilerBuilder(internal::GetSharedTestingDescriptorPool())); |
| 44 | builder->AddLibrary(StandardCompilerLibrary()).IgnoreError(); |
| 45 | builder->AddLibrary(OptionalCompilerLibrary()).IgnoreError(); |
| 46 | builder->AddLibrary(extensions::StringsCompilerLibrary()).IgnoreError(); |
| 47 | cel::Type message_type = cel::Type::Message( |
| 48 | builder->GetCheckerBuilder().descriptor_pool()->FindMessageTypeByName( |
| 49 | "cel.expr.conformance.proto3.TestAllTypes")); |
| 50 | CEL_RETURN_IF_ERROR(builder->GetCheckerBuilder().AddVariable( |
| 51 | MakeVariableDecl("msg", message_type))); |
| 52 | return builder->Build(); |
| 53 | } |
| 54 | |
| 55 | struct TestCase { |
| 56 | std::string expression; |
nothing calls this directly
no test coverage detected