@@ -26,7 +26,6 @@ import Data.Maybe
26
26
import Data.String.Here
27
27
import Data.Text (Text )
28
28
import Data.Text qualified as T
29
- import Data.Text.IO qualified as T
30
29
import Data.Time (diffUTCTime , getCurrentTime )
31
30
import Data.Tuple.Extra
32
31
import Data.Tree (flatten )
@@ -274,9 +273,7 @@ tests = testGroup "hevm"
274
273
}
275
274
|]
276
275
expr <- withDefaultSolver $ \ s -> getExpr s c (Just (Sig " prove_mapping_access(address,address)" [AbiAddressType , AbiAddressType ])) [] defaultVeriOpts
277
- putStrLnM $ T. unpack $ formatExpr expr
278
276
let simpExpr = mapExprM Expr. decomposeStorage expr
279
- -- putStrLnM $ T.unpack $ formatExpr (fromJust simpExpr)
280
277
assertEqualM " Decompose did not succeed." (isJust simpExpr) True
281
278
, test " decompose-2" $ do
282
279
Just c <- solcRuntime " MyContract"
@@ -1423,7 +1420,6 @@ tests = testGroup "hevm"
1423
1420
}
1424
1421
|]
1425
1422
Right e <- reachableUserAsserts c Nothing
1426
- liftIO $ T. putStrLn $ formatExpr e
1427
1423
assertBoolM " The expression is not partial" $ Expr. containsNode isPartial e
1428
1424
,
1429
1425
-- TODO: we can't deal with symbolic jump conditions
@@ -1528,7 +1524,10 @@ tests = testGroup "hevm"
1528
1524
|]
1529
1525
let sig = Just (Sig " fun(uint256,uint256)" [AbiUIntType 256 , AbiUIntType 256 ])
1530
1526
(_, k) <- withDefaultSolver $ \ s -> checkAssert s defaultPanicCodes c sig [] defaultVeriOpts
1531
- putStrLnM $ " Ret: " <> (show k)
1527
+ let numErrs = sum $ map (fromEnum . isError) k
1528
+ assertEqualM " number of errors (i.e. copySlice issues) is 1" 1 numErrs
1529
+ let errStrings = mapMaybe EVM.SymExec. getError k
1530
+ assertEqualM " All errors are from copyslice" True $ all (" CopySlice" `List.isInfixOf` ) errStrings
1532
1531
]
1533
1532
, testGroup " Symbolic-Constructor-Args"
1534
1533
-- this produced some hard to debug failures. keeping it around since it seemed to exercise the contract creation code in interesting ways...
0 commit comments