File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 11{-# LANGUAGE FlexibleContexts #-}
2- {-# LANGUAGE NamedFieldPuns #-}
32
43import Test.Tasty (defaultMain , testGroup )
54import System.Directory (withCurrentDirectory )
@@ -11,6 +10,7 @@ import Tests.Config (configTests)
1110import Tests.Encoding (encodingJSONTests )
1211import Tests.Integration (integrationTests )
1312import Tests.Optimization (optimizationTests )
13+ import Tests.Overflow (overflowTests )
1414import Tests.Research (researchTests )
1515import Tests.Values (valuesTests )
1616import Tests.Seed (seedTests )
@@ -27,6 +27,7 @@ main = withCurrentDirectory "./tests/solidity" . defaultMain $
2727 , coverageTests
2828 , abiv2Tests
2929 , assertionTests
30+ , overflowTests
3031 , optimizationTests
3132 , researchTests
3233 , encodingJSONTests
Original file line number Diff line number Diff line change 1+ module Tests.Overflow (overflowTests ) where
2+
3+ import Test.Tasty (TestTree , testGroup )
4+
5+ import Common (testContractV , solcV , solvedUsing )
6+
7+ overflowTests :: TestTree
8+ overflowTests = testGroup " Overflow-based Integration Testing"
9+ [
10+ testContractV " overflow/overflow.sol" (Just (\ v -> v >= solcV (0 ,8 ,0 ))) (Just " overflow/config.yaml" )
11+ [ (" f passed" , solvedUsing " f" " Integer (over/under)flow" ) ]
12+ ]
Original file line number Diff line number Diff line change 1+ testMode : overflow
Original file line number Diff line number Diff line change 1+ contract Test {
2+ function f (uint x ) public {
3+ type (uint256 ).max + x;
4+ }
5+ }
You can’t perform that action at this time.
0 commit comments