Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cedar-drt/fuzz/src/props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ pub fn schema_to_cedar_parses(schema: &Schema) -> Schema {
/// indicate a bug.
pub fn entity_protobuf_decodes(buf: &[u8], original: &Entity) {
match Entity::decode(buf) {
Ok(decoded) => assert_eq!(*original, decoded),
Ok(decoded) => pretty_assert_entities_deep_eq(
&Entities::from_entities([original.clone()], None)
.expect("failed to create entities from single entity"),
&Entities::from_entities([decoded], None)
.expect("failed to create entities from single entity"),
),
// we expect conversion errors here: the entity has not been validated first, we only
// test that the protobuf decoding part works, not the conversion
Err(DecodeError::Conversion(_)) => (),
Expand Down