mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix tests to use unimplementedFunctions
This commit is contained in:
parent
494dea262e
commit
ef8c404c45
@ -624,7 +624,7 @@ BOOST_AUTO_TEST_CASE(function_no_implementation)
|
|||||||
std::vector<ASTPointer<ASTNode>> nodes = sourceUnit->nodes();
|
std::vector<ASTPointer<ASTNode>> nodes = sourceUnit->nodes();
|
||||||
ContractDefinition* contract = dynamic_cast<ContractDefinition*>(nodes[1].get());
|
ContractDefinition* contract = dynamic_cast<ContractDefinition*>(nodes[1].get());
|
||||||
BOOST_REQUIRE(contract);
|
BOOST_REQUIRE(contract);
|
||||||
BOOST_CHECK(!contract->annotation().isFullyImplemented);
|
BOOST_CHECK(!contract->annotation().unimplementedFunctions.empty());
|
||||||
BOOST_CHECK(!contract->definedFunctions()[0]->isImplemented());
|
BOOST_CHECK(!contract->definedFunctions()[0]->isImplemented());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,10 +640,10 @@ BOOST_AUTO_TEST_CASE(abstract_contract)
|
|||||||
ContractDefinition* base = dynamic_cast<ContractDefinition*>(nodes[1].get());
|
ContractDefinition* base = dynamic_cast<ContractDefinition*>(nodes[1].get());
|
||||||
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
|
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
|
||||||
BOOST_REQUIRE(base);
|
BOOST_REQUIRE(base);
|
||||||
BOOST_CHECK(!base->annotation().isFullyImplemented);
|
BOOST_CHECK(!base->annotation().unimplementedFunctions.empty());
|
||||||
BOOST_CHECK(!base->definedFunctions()[0]->isImplemented());
|
BOOST_CHECK(!base->definedFunctions()[0]->isImplemented());
|
||||||
BOOST_REQUIRE(derived);
|
BOOST_REQUIRE(derived);
|
||||||
BOOST_CHECK(derived->annotation().isFullyImplemented);
|
BOOST_CHECK(derived->annotation().unimplementedFunctions.empty());
|
||||||
BOOST_CHECK(derived->definedFunctions()[0]->isImplemented());
|
BOOST_CHECK(derived->definedFunctions()[0]->isImplemented());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -659,9 +659,9 @@ BOOST_AUTO_TEST_CASE(abstract_contract_with_overload)
|
|||||||
ContractDefinition* base = dynamic_cast<ContractDefinition*>(nodes[1].get());
|
ContractDefinition* base = dynamic_cast<ContractDefinition*>(nodes[1].get());
|
||||||
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
|
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
|
||||||
BOOST_REQUIRE(base);
|
BOOST_REQUIRE(base);
|
||||||
BOOST_CHECK(!base->annotation().isFullyImplemented);
|
BOOST_CHECK(!base->annotation().unimplementedFunctions.empty());
|
||||||
BOOST_REQUIRE(derived);
|
BOOST_REQUIRE(derived);
|
||||||
BOOST_CHECK(!derived->annotation().isFullyImplemented);
|
BOOST_CHECK(!derived->annotation().unimplementedFunctions.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(create_abstract_contract)
|
BOOST_AUTO_TEST_CASE(create_abstract_contract)
|
||||||
@ -693,7 +693,7 @@ BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_optional)
|
|||||||
BOOST_CHECK_EQUAL(nodes.size(), 4);
|
BOOST_CHECK_EQUAL(nodes.size(), 4);
|
||||||
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[3].get());
|
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[3].get());
|
||||||
BOOST_REQUIRE(derived);
|
BOOST_REQUIRE(derived);
|
||||||
BOOST_CHECK(!derived->annotation().isFullyImplemented);
|
BOOST_CHECK(!derived->annotation().unimplementedFunctions.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_not_provided)
|
BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_not_provided)
|
||||||
@ -712,7 +712,7 @@ BOOST_AUTO_TEST_CASE(abstract_contract_constructor_args_not_provided)
|
|||||||
BOOST_CHECK_EQUAL(nodes.size(), 4);
|
BOOST_CHECK_EQUAL(nodes.size(), 4);
|
||||||
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[3].get());
|
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[3].get());
|
||||||
BOOST_REQUIRE(derived);
|
BOOST_REQUIRE(derived);
|
||||||
BOOST_CHECK(!derived->annotation().isFullyImplemented);
|
BOOST_CHECK(!derived->annotation().unimplementedFunctions.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(redeclare_implemented_abstract_function_as_abstract)
|
BOOST_AUTO_TEST_CASE(redeclare_implemented_abstract_function_as_abstract)
|
||||||
@ -738,7 +738,7 @@ BOOST_AUTO_TEST_CASE(implement_abstract_via_constructor)
|
|||||||
BOOST_CHECK_EQUAL(nodes.size(), 3);
|
BOOST_CHECK_EQUAL(nodes.size(), 3);
|
||||||
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
|
ContractDefinition* derived = dynamic_cast<ContractDefinition*>(nodes[2].get());
|
||||||
BOOST_REQUIRE(derived);
|
BOOST_REQUIRE(derived);
|
||||||
BOOST_CHECK(!derived->annotation().isFullyImplemented);
|
BOOST_CHECK(!derived->annotation().unimplementedFunctions.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(function_canonical_signature)
|
BOOST_AUTO_TEST_CASE(function_canonical_signature)
|
||||||
|
Loading…
Reference in New Issue
Block a user