Enable use of coverage by default (#605)

* Update Config.hs

* coverage enabled by default

* fixed test

* fixed test

* disabled coverage for the eip-170 test
pull/612/head
Gustavo Grieco 4 years ago committed by GitHub
parent 182b15a114
commit 5420a4ff3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      examples/solidity/basic/eip-170.yaml
  2. 4
      lib/Echidna/Config.hs
  3. 4
      src/test/Tests/Config.hs
  4. 2
      src/test/Tests/Integration.hs

@ -1,3 +1,4 @@
codeSize: 28000
coverage: false
testLimit: 1
seqLen: 1

@ -118,8 +118,8 @@ instance FromJSON EConfigWithUsage where
return $ TestConf classify (const psender)
-- CampaignConf
cov = v ..:? "coverage" <&> \case Just True -> Just mempty
_ -> Nothing
cov = v ..:? "coverage" <&> \case Just False -> Nothing
_ -> Just mempty
cc = CampaignConf <$> v ..:? "testLimit" ..!= 50000
<*> v ..:? "stopOnFail" ..!= False
<*> v ..:? "estimateGas" ..!= False

@ -16,8 +16,8 @@ configTests = testGroup "Configuration tests" $
[ testCase "parse \"coverage: true\"" $ do
config <- _econfig <$> parseConfig "coverage/test.yaml"
assertCoverage config $ Just mempty
, testCase "coverage disabled by default" $
assertCoverage defaultConfig Nothing
, testCase "coverage enabled by default" $
assertCoverage defaultConfig $ Just mempty
, testCase "default.yaml" $ do
EConfigWithUsage _ bad unset <- parseConfig "basic/default.yaml"
assertBool ("unused options: " ++ show bad) $ null bad

@ -153,6 +153,6 @@ integrationTests = testGroup "Solidity Integration Testing"
[ ("echidna_still_alive failed", solved "echidna_still_alive") ]
, checkConstructorConditions "basic/codesize.sol"
"invalid codesize"
, testContract "basic/eip-170.sol" (Just "basic/eip-170.yaml")
, testContractV "basic/eip-170.sol" (Just (>= solcV (0,5,0))) (Just "basic/eip-170.yaml")
[ ("echidna_test passed", passed "echidna_test") ]
]

Loading…
Cancel
Save