aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-03-22 01:41:53 +0800
committerGitHub <noreply@github.com>2017-03-22 01:41:53 +0800
commitd626876310c6c4d134b97b847d199dd78d3c5bea (patch)
tree2c3c288879eeeb77877c51a2cef23ce339bcaadd /test
parent6fb27dee635748110a27654a5a2c322d865b8578 (diff)
parentd8aacd5a404f7fedaec269f0d30284a8a7fc6ffc (diff)
downloaddexon-solidity-d626876310c6c4d134b97b847d199dd78d3c5bea.tar
dexon-solidity-d626876310c6c4d134b97b847d199dd78d3c5bea.tar.gz
dexon-solidity-d626876310c6c4d134b97b847d199dd78d3c5bea.tar.bz2
dexon-solidity-d626876310c6c4d134b97b847d199dd78d3c5bea.tar.lz
dexon-solidity-d626876310c6c4d134b97b847d199dd78d3c5bea.tar.xz
dexon-solidity-d626876310c6c4d134b97b847d199dd78d3c5bea.tar.zst
dexon-solidity-d626876310c6c4d134b97b847d199dd78d3c5bea.zip
Merge pull request #1811 from ethereum/unimplementedConstructors
Contract inheriting from base with unimplemented constructor is abstract.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index c002fd3e..1388f01b 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -624,7 +624,12 @@ BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_optional)
function foo() {}
}
)";
- ETH_TEST_REQUIRE_NO_THROW(parseAndAnalyse(text), "Parsing and name resolving failed");
+ ETH_TEST_REQUIRE_NO_THROW(sourceUnit = parseAndAnalyse(text), "Parsing and name resolving failed");
+ std::vector<ASTPointer<ASTNode>> nodes = sourceUnit->nodes();
+ BOOST_CHECK_EQUAL(nodes.size(), 4);
+ ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[3].get());
+ BOOST_REQUIRE(derived);
+ BOOST_CHECK(!derived->annotation().isFullyImplemented);
}
BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_not_provided)