From e4851cf59eed8d39a4b95e1ce8181b52e5c66d78 Mon Sep 17 00:00:00 2001 From: Leonardo Alt Date: Wed, 10 Oct 2018 14:31:49 +0200 Subject: [SMTChecker] Inline calls to internal functions --- test/libsolidity/SMTChecker.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'test/libsolidity/SMTChecker.cpp') 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{ + "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{ + "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"); } -- cgit v1.2.3