aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-22 08:02:38 +0800
committerChristian <c@ethdev.com>2015-01-26 17:23:39 +0800
commitc86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539 (patch)
treef51621e34fad1fdfdee860982649aacb842d8b6a /SolidityEndToEndTest.cpp
parentdabf94767920040a51dc20c5d4ab6655fc3ec63a (diff)
downloaddexon-solidity-c86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539.tar
dexon-solidity-c86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539.tar.gz
dexon-solidity-c86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539.tar.bz2
dexon-solidity-c86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539.tar.lz
dexon-solidity-c86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539.tar.xz
dexon-solidity-c86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539.tar.zst
dexon-solidity-c86a46b84d13cd0c12c6a2ea1bc2b096b9d1a539.zip
Type resolution for function modifiers.
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-rw-r--r--SolidityEndToEndTest.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index cf04edaa..8bce1788 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -1650,6 +1650,26 @@ BOOST_AUTO_TEST_CASE(constructor_argument_overriding)
BOOST_CHECK(callContractFunction("getA()") == encodeArgs(3));
}
+BOOST_AUTO_TEST_CASE(function_modifier)
+{
+ char const* sourceCode = R"(
+ contract BaseBase {
+ uint m_a;
+ function BaseBase(uint a) {
+ m_a = a;
+ }
+ }
+ contract Base is BaseBase(2) { }
+ contract Derived is Base, BaseBase(3) {
+ function getA() returns (uint r) { return m_a; }
+ }
+ )";
+ compileAndRun(sourceCode, 0, "Derived");
+ BOOST_CHECK(callContractFunction("getA()") == encodeArgs(3));
+}
+
+// modifier overriding
+
BOOST_AUTO_TEST_SUITE_END()
}