aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorFederico Bond <federicobond@gmail.com>2017-08-09 05:58:06 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-12 00:28:48 +0800
commita8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c (patch)
tree785f44a497e3033e2163bd751f7660478a9f47bc /test/libsolidity
parent5b26e2bcee5f0cf3243fdcda53b47739f10158bb (diff)
downloaddexon-solidity-a8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c.tar.gz
dexon-solidity-a8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c.tar.zst
dexon-solidity-a8c047f48d61a3f27ea37f3b677cc4b1f3cbff3c.zip
Enforce commas in tuple syntax
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityParser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index 2be824d6..3890ca21 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -1187,6 +1187,18 @@ BOOST_AUTO_TEST_CASE(tuples)
BOOST_CHECK(successParse(text));
}
+BOOST_AUTO_TEST_CASE(tuples_without_commas)
+{
+ char const* text = R"(
+ contract C {
+ function f() {
+ var a = (2 2);
+ }
+ }
+ )";
+ CHECK_PARSE_ERROR(text, "Expected token Comma");
+}
+
BOOST_AUTO_TEST_CASE(member_access_parser_ambiguity)
{
char const* text = R"(