-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
call property and optimization tests even if they aren't targeted
- Loading branch information
1 parent
27d1623
commit 5a66fa2
Showing
6 changed files
with
98 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
fuzzing/testdata/contracts/filtering/target_and_exclude.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// This contract ensures that we can target or exclude functions | ||
contract TestContract { | ||
uint odd_counter = 1; | ||
uint even_counter = 2; | ||
event Counter(uint256 value); | ||
function f() public { | ||
odd_counter += 1; | ||
emit Counter(odd_counter); | ||
} | ||
|
||
function g() public { | ||
even_counter += 2; | ||
emit Counter(even_counter); | ||
|
||
} | ||
|
||
function h() public { | ||
odd_counter += 3; | ||
emit Counter(odd_counter); | ||
|
||
} | ||
|
||
function i() public { | ||
even_counter += 4; | ||
emit Counter(even_counter); | ||
} | ||
|
||
function property_a() public view returns (bool) { | ||
return (odd_counter != 100); | ||
} | ||
|
||
function optimize_b() public view returns (int256) { | ||
return -1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters