Skip to content

Commit

Permalink
Adjust test to match new selfdestruct behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Sep 16, 2024
1 parent d03c34a commit 4c4421d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/Tests/Integration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ integrationTests = testGroup "Solidity Integration Testing"
]
, testContract "basic/gaslimit.sol" Nothing
[ ("echidna_gaslimit passed", passed "echidna_gaslimit") ]
, testContractV "basic/killed.sol" (Just (< solcV (0,8,0))) Nothing
, testContractV "basic/killed.sol" (Just (< solcV (0,8,0))) (Just "basic/killed.yaml")
[ ("echidna_still_alive failed", solved "echidna_still_alive") ]
, checkConstructorConditions "basic/codesize.sol"
"invalid codesize"
Expand Down
3 changes: 2 additions & 1 deletion tests/solidity/basic/killed.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
contract C {
constructor() public payable {}

uint private state = 0;
function f(uint x) public {
Expand All @@ -11,7 +12,7 @@ contract C {
}

function echidna_still_alive() public returns (bool) {
return true;
return address(this).balance > 0;
}

function echidna_revert_still_alive() public returns (bool) {
Expand Down
1 change: 1 addition & 0 deletions tests/solidity/basic/killed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
balanceContract: 100

0 comments on commit 4c4421d

Please sign in to comment.