aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorLu Guanqun <guanqun.lu@gmail.com>2016-01-19 10:18:01 +0800
committerLu Guanqun <guanqun.lu@gmail.com>2016-01-19 11:24:58 +0800
commitdf728581ce1bb05a338519efc6b834adfed68d90 (patch)
treebbb96a4c9da2d42e653e0cdb6d7ae6ae7c76ed17 /test/libsolidity
parentc8886ed5cfc4f0b7bf4e8d52eb94da7137c9b70e (diff)
downloaddexon-solidity-df728581ce1bb05a338519efc6b834adfed68d90.tar.gz
dexon-solidity-df728581ce1bb05a338519efc6b834adfed68d90.tar.zst
dexon-solidity-df728581ce1bb05a338519efc6b834adfed68d90.zip
add another test case for continue not in loop
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp15
1 files changed, 15 insertions, 0 deletions
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()
}