Skip to content

Commit

Permalink
SMTChecker docs test may issue a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonardo Alt committed Mar 10, 2020
1 parent 5fd5465 commit 1b17815
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/security-considerations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ not mean loss of proving power.

pragma solidity >=0.5.0;
pragma experimental SMTChecker;
// This may report a warning if no SMT solver available.

contract Recover
{
Expand Down Expand Up @@ -601,6 +602,7 @@ types.
pragma solidity >=0.5.0;
pragma experimental SMTChecker;
// This will report a warning

contract Aliasing
{
uint[] array;
Expand Down
11 changes: 10 additions & 1 deletion test/cmdlineTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ function compileFull()
expect_output=1
shift;
fi
if [[ $1 = '-o' ]]
then
expect_output=2
shift;
fi

local files="$*"
local output
Expand All @@ -93,7 +98,7 @@ function compileFull()
if [[ \
"$exit_code" -ne "$expected_exit_code" || \
( $expect_output -eq 0 && -n "$errors" ) || \
( $expect_output -ne 0 && -z "$errors" ) \
( $expect_output -eq 1 && -z "$errors" ) \
]]
then
printError "Unexpected compilation result:"
Expand Down Expand Up @@ -350,6 +355,10 @@ SOLTMPDIR=$(mktemp -d)
then
opts="$opts -w"
fi
if grep "This may report a warning" "$f" >/dev/null
then
opts="$opts -o"
fi
compileFull $opts "$SOLTMPDIR/$f"
done
)
Expand Down

0 comments on commit 1b17815

Please sign in to comment.