diff options
author | chriseth <chris@ethereum.org> | 2016-09-06 23:52:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-06 23:52:17 +0800 |
commit | e8cb4d28970befb4c3e5052078e1b13812a44256 (patch) | |
tree | df88d1347a554185a56360954592ccab2a38de51 /test | |
parent | 453490cb61002622fadddf5838d29a8483f364ae (diff) | |
parent | 347b6b484398ccbb82fbc5cab0cada54bb07548a (diff) | |
download | dexon-solidity-e8cb4d28970befb4c3e5052078e1b13812a44256.tar dexon-solidity-e8cb4d28970befb4c3e5052078e1b13812a44256.tar.gz dexon-solidity-e8cb4d28970befb4c3e5052078e1b13812a44256.tar.bz2 dexon-solidity-e8cb4d28970befb4c3e5052078e1b13812a44256.tar.lz dexon-solidity-e8cb4d28970befb4c3e5052078e1b13812a44256.tar.xz dexon-solidity-e8cb4d28970befb4c3e5052078e1b13812a44256.tar.zst dexon-solidity-e8cb4d28970befb4c3e5052078e1b13812a44256.zip |
Merge pull request #1018 from ethereum/constructor-constant
Constructor constant
Diffstat (limited to 'test')
-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() } |