@@ -26,7 +26,6 @@ import Data.Maybe
2626import Data.String.Here
2727import Data.Text (Text )
2828import Data.Text qualified as T
29- import Data.Text.IO qualified as T
3029import Data.Time (diffUTCTime , getCurrentTime )
3130import Data.Tuple.Extra
3231import Data.Tree (flatten )
@@ -274,9 +273,7 @@ tests = testGroup "hevm"
274273 }
275274 |]
276275 expr <- withDefaultSolver $ \ s -> getExpr s c (Just (Sig " prove_mapping_access(address,address)" [AbiAddressType , AbiAddressType ])) [] defaultVeriOpts
277- putStrLnM $ T. unpack $ formatExpr expr
278276 let simpExpr = mapExprM Expr. decomposeStorage expr
279- -- putStrLnM $ T.unpack $ formatExpr (fromJust simpExpr)
280277 assertEqualM " Decompose did not succeed." (isJust simpExpr) True
281278 , test " decompose-2" $ do
282279 Just c <- solcRuntime " MyContract"
@@ -1423,7 +1420,6 @@ tests = testGroup "hevm"
14231420 }
14241421 |]
14251422 Right e <- reachableUserAsserts c Nothing
1426- liftIO $ T. putStrLn $ formatExpr e
14271423 assertBoolM " The expression is not partial" $ Expr. containsNode isPartial e
14281424 ,
14291425 -- TODO: we can't deal with symbolic jump conditions
@@ -1528,7 +1524,10 @@ tests = testGroup "hevm"
15281524 |]
15291525 let sig = Just (Sig " fun(uint256,uint256)" [AbiUIntType 256 , AbiUIntType 256 ])
15301526 (_, 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
15321531 ]
15331532 , testGroup " Symbolic-Constructor-Args"
15341533 -- 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