From 9577f87dfcd2d8b532f698c0aa1e8f9c01bb0ba5 Mon Sep 17 00:00:00 2001 From: chriseth Date: Mon, 24 Apr 2017 18:08:21 +0200 Subject: [PATCH] More pure tests. --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 0de89aa13..b98c3706f 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5492,6 +5492,14 @@ BOOST_AUTO_TEST_CASE(bare_revert) CHECK_WARNING(text, "Statement has no effect."); } +BOOST_AUTO_TEST_CASE(bare_others) +{ + CHECK_WARNING("contract C { function f() { selfdestruct; } }", "Statement has no effect."); + CHECK_WARNING("contract C { function f() { assert; } }", "Statement has no effect."); + CHECK_WARNING("contract C { function f() { require; } }", "Statement has no effect."); + CHECK_WARNING("contract C { function f() { suicide; } }", "Statement has no effect."); +} + BOOST_AUTO_TEST_CASE(pure_statement_in_for_loop) { char const* text = R"(