-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update slither-flat test cases, run solc out its output
- Loading branch information
1 parent
718e511
commit 6e781e1
Showing
5 changed files
with
31 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
contract A{ | ||
pragma solidity 0.8.19; | ||
|
||
} | ||
error RevertIt(); | ||
|
||
contract Example { | ||
function reverts() external pure { | ||
revert RevertIt(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
import "./a.sol"; | ||
|
||
contract B is A{ | ||
pragma solidity 0.8.19; | ||
|
||
enum B { | ||
a, | ||
b | ||
} | ||
|
||
contract T { | ||
Example e = new Example(); | ||
function b() public returns(uint) { | ||
B b = B.a; | ||
return 4; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,12 +1,20 @@ | ||
#!/usr/bin/env bash | ||
shopt -s extglob | ||
|
||
### Test slither-prop | ||
### Test slither-flat | ||
solc-select use 0.8.19 --always-install | ||
|
||
cd examples/flat || exit 1 | ||
|
||
if ! slither-flat b.sol; then | ||
echo "slither-flat failed" | ||
exit 1 | ||
fi | ||
|
||
SUFFIX = '@(sol)' | ||
if ! solc "crytic-export/flattening/"*$SUFFIX; then | ||
echo "solc failed on flattened files" | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
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