diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-10-10 20:31:49 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-10-15 21:11:21 +0800 |
commit | e4851cf59eed8d39a4b95e1ce8181b52e5c66d78 (patch) | |
tree | a1f3be719b94b81608ff4bc7c20f0b93b6090c36 /test/libsolidity/SMTChecker.cpp | |
parent | 88b1558862602049261b8530c6c7edcd23b96eb7 (diff) | |
download | dexon-solidity-e4851cf59eed8d39a4b95e1ce8181b52e5c66d78.tar.gz dexon-solidity-e4851cf59eed8d39a4b95e1ce8181b52e5c66d78.tar.zst dexon-solidity-e4851cf59eed8d39a4b95e1ce8181b52e5c66d78.zip |
[SMTChecker] Inline calls to internal functions
Diffstat (limited to 'test/libsolidity/SMTChecker.cpp')
-rw-r--r-- | test/libsolidity/SMTChecker.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/test/libsolidity/SMTChecker.cpp b/test/libsolidity/SMTChecker.cpp index 1f6f765f..c7e60256 100644 --- a/test/libsolidity/SMTChecker.cpp +++ b/test/libsolidity/SMTChecker.cpp @@ -137,16 +137,17 @@ BOOST_AUTO_TEST_CASE(function_call_does_not_clear_local_vars) { string text = R"( contract C { - function f() public { + function g() public pure {} + function f() public view { uint a = 3; - this.f(); + this.g(); assert(a == 3); - f(); + g(); assert(a == 3); } } )"; - CHECK_SUCCESS_NO_WARNINGS(text); + CHECK_WARNING(text, "Assertion checker does not yet implement this type of function call"); } BOOST_AUTO_TEST_CASE(branches_merge_variables) @@ -569,7 +570,10 @@ BOOST_AUTO_TEST_CASE(constant_condition) } } )"; - CHECK_WARNING(text, "Condition is always true"); + CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{ + "Condition is always true", + "Assertion checker does not yet implement this type of function call" + })); text = R"( contract C { function f(uint x) public pure { @@ -577,7 +581,10 @@ BOOST_AUTO_TEST_CASE(constant_condition) } } )"; - CHECK_WARNING(text, "Condition is always false"); + CHECK_WARNING_ALLOW_MULTI(text, (vector<string>{ + "Condition is always false", + "Assertion checker does not yet implement this type of function call" + })); // a plain literal constant is fine text = R"( contract C { @@ -586,7 +593,7 @@ BOOST_AUTO_TEST_CASE(constant_condition) } } )"; - CHECK_SUCCESS_NO_WARNINGS(text); + CHECK_WARNING(text, "Assertion checker does not yet implement this type of function call"); } |