diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-09-06 09:51:01 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-09-06 23:31:39 +0800 |
commit | 05ae5e4f5a3246c3af32b9ca1f8244acd7382ee8 (patch) | |
tree | 0ba1b17a7bf0c151a647f2df116881bd687dda19 /test/libsolidity | |
parent | 319ec340934480eeb044c8c4e35e0471998bd733 (diff) | |
download | dexon-solidity-05ae5e4f5a3246c3af32b9ca1f8244acd7382ee8.tar.gz dexon-solidity-05ae5e4f5a3246c3af32b9ca1f8244acd7382ee8.tar.zst dexon-solidity-05ae5e4f5a3246c3af32b9ca1f8244acd7382ee8.zip |
Tests for constant constructors
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 882557fd..4de2c126 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -3989,6 +3989,17 @@ BOOST_AUTO_TEST_CASE(unsatisfied_version) BOOST_CHECK(expectError(text, true) == Error::Type::SyntaxError); } +BOOST_AUTO_TEST_CASE(constant_constructor) +{ + char const* text = R"( + contract test { + function test() constant {} + } + )"; + BOOST_CHECK(expectError(text, false) == Error::Type::TypeError); +} + + BOOST_AUTO_TEST_SUITE_END() } |