google / cel-cpp

Fast, portable, non-Turing complete expression evaluation (C++)
https://cel.dev
Apache License 2.0
159 stars 47 forks source link

Add a matcher to test cel::StructValue against a protobuf message. #789

Closed copybara-service[bot] closed 1 week ago

copybara-service[bot] commented 1 week ago

Add a matcher to test cel::StructValue against a protobuf message.

This facilitates testing the content of a StructValue when its type matches a protobuf message, instead of testing every individual field.

Example usage:

ASSERT_THAT(l, StructValueAsProto(EqualsProto("my_int: 42")));