diff options
author | Lu Guanqun <guanqun.lu@gmail.com> | 2015-02-28 16:29:32 +0800 |
---|---|---|
committer | Lu Guanqun <guanqun.lu@gmail.com> | 2015-03-08 22:48:53 +0800 |
commit | b87c5547a5b9f307c2a0871e537a37508bc4da75 (patch) | |
tree | 118c477f7d04a343d8325b1637080e2c798a5f9f /SolidityNameAndTypeResolution.cpp | |
parent | 7d7f9ec67f69d66fa6872072e63272a53ff30dcd (diff) | |
download | dexon-solidity-b87c5547a5b9f307c2a0871e537a37508bc4da75.tar dexon-solidity-b87c5547a5b9f307c2a0871e537a37508bc4da75.tar.gz dexon-solidity-b87c5547a5b9f307c2a0871e537a37508bc4da75.tar.bz2 dexon-solidity-b87c5547a5b9f307c2a0871e537a37508bc4da75.tar.lz dexon-solidity-b87c5547a5b9f307c2a0871e537a37508bc4da75.tar.xz dexon-solidity-b87c5547a5b9f307c2a0871e537a37508bc4da75.tar.zst dexon-solidity-b87c5547a5b9f307c2a0871e537a37508bc4da75.zip |
add test cases for functions in derived overload functions in base
Diffstat (limited to 'SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | SolidityNameAndTypeResolution.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/SolidityNameAndTypeResolution.cpp b/SolidityNameAndTypeResolution.cpp index c3a4a337..d2ae3f73 100644 --- a/SolidityNameAndTypeResolution.cpp +++ b/SolidityNameAndTypeResolution.cpp @@ -424,23 +424,23 @@ BOOST_AUTO_TEST_CASE(cyclic_inheritance) BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); } -BOOST_AUTO_TEST_CASE(illegal_override_direct) +BOOST_AUTO_TEST_CASE(legal_override_direct) { char const* text = R"( contract B { function f() {} } contract C is B { function f(uint i) {} } )"; - BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); + BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text)); } -BOOST_AUTO_TEST_CASE(illegal_override_indirect) +BOOST_AUTO_TEST_CASE(legal_override_indirect) { char const* text = R"( contract A { function f(uint a) {} } contract B { function f() {} } contract C is A, B { } )"; - BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); + BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text)); } BOOST_AUTO_TEST_CASE(illegal_override_visibility) |