diff options
author | chriseth <chris@ethereum.org> | 2017-03-22 01:11:43 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-03-22 01:11:43 +0800 |
commit | 766fa2fe85cd0c2bb8f29dc4d4deac928a86265a (patch) | |
tree | ec6bacc63fe26be0e63427747d56e598c88e265c | |
parent | 6fb27dee635748110a27654a5a2c322d865b8578 (diff) | |
download | dexon-solidity-766fa2fe85cd0c2bb8f29dc4d4deac928a86265a.tar dexon-solidity-766fa2fe85cd0c2bb8f29dc4d4deac928a86265a.tar.gz dexon-solidity-766fa2fe85cd0c2bb8f29dc4d4deac928a86265a.tar.bz2 dexon-solidity-766fa2fe85cd0c2bb8f29dc4d4deac928a86265a.tar.lz dexon-solidity-766fa2fe85cd0c2bb8f29dc4d4deac928a86265a.tar.xz dexon-solidity-766fa2fe85cd0c2bb8f29dc4d4deac928a86265a.tar.zst dexon-solidity-766fa2fe85cd0c2bb8f29dc4d4deac928a86265a.zip |
Check that contract inheriting from base with unimplemented constructor is abstract.
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 7 |
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) |