From df728581ce1bb05a338519efc6b834adfed68d90 Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Tue, 19 Jan 2016 02:18:01 +0000 Subject: add another test case for continue not in loop --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 11e78d94..a95021ea 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -2934,6 +2934,21 @@ BOOST_AUTO_TEST_CASE(continue_not_in_loop) BOOST_CHECK(expectError(text) == Error::Type::SyntaxError); } +BOOST_AUTO_TEST_CASE(continue_not_in_loop_2) +{ + char const* text = R"( + contract C { + function f() { + while (true) + { + } + continue; + } + } + )"; + BOOST_CHECK(expectError(text) == Error::Type::SyntaxError); +} + BOOST_AUTO_TEST_SUITE_END() } -- cgit