diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-15 09:26:24 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-24 20:46:18 +0800 |
commit | 5668377c721c48f03518a02d0b3e45b5b61a52f6 (patch) | |
tree | 6a9d0aad4eb25219debe2019697d89c579f32358 /test | |
parent | 65d78f36c1f5b88546261bc005ef952065d34adf (diff) | |
download | dexon-solidity-5668377c721c48f03518a02d0b3e45b5b61a52f6.tar dexon-solidity-5668377c721c48f03518a02d0b3e45b5b61a52f6.tar.gz dexon-solidity-5668377c721c48f03518a02d0b3e45b5b61a52f6.tar.bz2 dexon-solidity-5668377c721c48f03518a02d0b3e45b5b61a52f6.tar.lz dexon-solidity-5668377c721c48f03518a02d0b3e45b5b61a52f6.tar.xz dexon-solidity-5668377c721c48f03518a02d0b3e45b5b61a52f6.tar.zst dexon-solidity-5668377c721c48f03518a02d0b3e45b5b61a52f6.zip |
Introduce pure specifier on functions
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 8e84ead1..a39e0958 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -928,6 +928,16 @@ BOOST_AUTO_TEST_CASE(multiple_statemutability_specifiers) function f() payable constant {} })"; CHECK_PARSE_ERROR(text, "State mutability already specified as \"payable\"."); + text = R"( + contract c { + function f() pure payable {} + })"; + CHECK_PARSE_ERROR(text, "State mutability already specified as \"pure\"."); + text = R"( + contract c { + function f() pure constant {} + })"; + CHECK_PARSE_ERROR(text, "State mutability already specified as \"pure\"."); } BOOST_AUTO_TEST_CASE(literal_constants_with_ether_subdenominations) |