Skip to content

Commit

Permalink
Merge pull request #569 from ethereum/check-equivalence-bug
Browse files Browse the repository at this point in the history
Add test to expose a bug in our checking of Expr equivalence for CopySlice
  • Loading branch information
msooseth authored Sep 30, 2024
2 parents cf9fb24 + 4833abb commit 25a7a7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,12 @@ tests = testGroup "hevm"
b = Expr.simplify a
ret <- checkEquiv a b
assertBoolM "must be equivalent" ret
, ignoreTest $ test "read-beyond-bound (negative-test)" $ do
let
e1 = CopySlice (Lit 1) (Lit 0) (Lit 2) (ConcreteBuf "a") (ConcreteBuf "")
e2 = ConcreteBuf "Definitely not the same!"
equal <- checkEquiv e1 e2
assertBoolM "Should not be equivalent!" $ not equal
]
-- These tests fuzz the simplifier by generating a random expression,
-- applying some simplification rules, and then using the smt encoding to
Expand Down

0 comments on commit 25a7a7e

Please sign in to comment.