aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-29 18:14:36 +0800
committerchriseth <chris@ethereum.org>2018-06-29 22:24:14 +0800
commit8747079746c1ca78dfabaca22bf1c011a342bb97 (patch)
tree5f2caf4c4710c904cdd12da643060bf2aa751d3d /test/libsolidity
parentf69e24c85e9e4131fe393cc0cf64900a19a88cc9 (diff)
downloaddexon-solidity-8747079746c1ca78dfabaca22bf1c011a342bb97.tar.gz
dexon-solidity-8747079746c1ca78dfabaca22bf1c011a342bb97.tar.zst
dexon-solidity-8747079746c1ca78dfabaca22bf1c011a342bb97.zip
Fix tests.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp28
1 files changed, 6 insertions, 22 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 7ea6cf98..889c68b9 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -2770,24 +2770,6 @@ BOOST_AUTO_TEST_CASE(virtual_function_usage_in_constructor_arguments)
ABI_CHECK(callContractFunction("getA()"), encodeArgs(2));
}
-BOOST_AUTO_TEST_CASE(constructor_argument_overriding)
-{
- char const* sourceCode = R"(
- contract BaseBase {
- uint m_a;
- constructor(uint a) {
- m_a = a;
- }
- }
- contract Base is BaseBase(2) { }
- contract Derived is BaseBase(3), Base {
- function getA() returns (uint r) { return m_a; }
- }
- )";
- compileAndRun(sourceCode, 0, "Derived");
- ABI_CHECK(callContractFunction("getA()"), encodeArgs(3));
-}
-
BOOST_AUTO_TEST_CASE(internal_constructor)
{
char const* sourceCode = R"(
@@ -5505,10 +5487,10 @@ BOOST_AUTO_TEST_CASE(pass_dynamic_arguments_to_the_base_base)
uint public m_i;
}
contract Base1 is Base {
- constructor(uint k) Base(k*k) {}
+ constructor(uint k) Base(k) {}
}
contract Derived is Base, Base1 {
- constructor(uint i) Base(i) Base1(i)
+ constructor(uint i) Base1(i)
{}
}
contract Final is Derived(4) {
@@ -5528,9 +5510,11 @@ BOOST_AUTO_TEST_CASE(pass_dynamic_arguments_to_the_base_base_with_gap)
}
uint public m_i;
}
- contract Base1 is Base(3) {}
+ contract Base1 is Base {
+ constructor(uint k) {}
+ }
contract Derived is Base, Base1 {
- constructor(uint i) Base(i) {}
+ constructor(uint i) Base(i) Base1(7) {}
}
contract Final is Derived(4) {
}