add another test case for continue not in loop

This commit is contained in:
Lu Guanqun
2016-01-19 03:24:58 +00:00
parent c8886ed5cf
commit df728581ce
2 changed files with 19 additions and 4 deletions
@@ -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()
}