Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
john-h-kastner-aws authored May 1, 2024
1 parent dc9854f commit 83533fa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions cedar-drt/fuzz/fuzz_targets/formatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ fuzz_target!(|input: FuzzTargetInput| {
);
assert!(
roundtripped
.non_head_constraints()
.eq_shape(t.non_head_constraints()),
.non_scope_constraints()
.eq_shape(t.non_scope_constraints()),
"\nnew policy condition: {}\nold policy condition: {}\n",
roundtripped.non_head_constraints(),
t.non_head_constraints(),
roundtripped.non_scope_constraints(),
t.non_scope_constraints(),
);
}
Err(err) => panic!(
Expand Down
8 changes: 4 additions & 4 deletions cedar-drt/fuzz/fuzz_targets/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ fn check_policy_equivalence(p1: &StaticPolicy, p2: &StaticPolicy) {
t1.resource_constraint()
);
assert!(
p2.non_head_constraints()
.eq_shape(t1.non_head_constraints()),
p2.non_scope_constraints()
.eq_shape(t1.non_scope_constraints()),
"\nnew policy condition: {}\nold policy condition: {}\n",
p2.non_head_constraints(),
t1.non_head_constraints()
p2.non_scope_constraints(),
t1.non_scope_constraints()
);
}

Expand Down
2 changes: 1 addition & 1 deletion cedar-lean/DiffTest/Parser.lean
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def jsonToTemplate (json : Lean.Json) : ParseResult Template := do
let principalConstraint ← getJsonField json "principal_constraint" >>= (getJsonField · "constraint") >>= jsonToScopeTemplate "?principal"
let actionConstraint ← getJsonField json "action_constraint" >>= jsonToActionScope
let resourceConstraint ← getJsonField json "resource_constraint" >>= (getJsonField · "constraint") >>= jsonToScopeTemplate "?resource"
let condition ← getJsonField json "non_head_constraints" >>= jsonToExpr
let condition ← getJsonField json "non_scope_constraints" >>= jsonToExpr
.ok {
effect := effect,
principalScope := .principalScope principalConstraint,
Expand Down

0 comments on commit 83533fa

Please sign in to comment.