diff options
author | chriseth <c@ethdev.com> | 2015-10-09 22:26:27 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-10-09 22:26:27 +0800 |
commit | c54a033bf036d16651fb992689adfcffb2f3a951 (patch) | |
tree | c202cdab8002d74d9032116b0e1cd2b1515b30a1 /test/libsolidity/SolidityParser.cpp | |
parent | b9a166061bc94cd06458c945d66bf52e76e84b70 (diff) | |
download | dexon-solidity-c54a033bf036d16651fb992689adfcffb2f3a951.tar.gz dexon-solidity-c54a033bf036d16651fb992689adfcffb2f3a951.tar.zst dexon-solidity-c54a033bf036d16651fb992689adfcffb2f3a951.zip |
Tests for multi variable declaration.
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 1e034863..569530b9 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -934,6 +934,24 @@ BOOST_AUTO_TEST_CASE(library_simple) BOOST_CHECK_NO_THROW(parseText(text)); } +BOOST_AUTO_TEST_CASE(multi_variable_declaration) +{ + char const* text = R"( + library Lib { + function f() { + var (a,b,c) = g(); + var (d) = 2; + var (,e) = 3; + var (f,) = 4; + var (x,,) = g(); + var (,y,) = g(); + } + function g() returns (uint, uint, uint) {} + } + )"; + BOOST_CHECK_NO_THROW(parseText(text)); +} + BOOST_AUTO_TEST_SUITE_END() } |