diff options
author | chriseth <c@ethdev.com> | 2016-08-26 05:53:03 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-08-30 21:31:50 +0800 |
commit | 4bfe09897e3346038b95eb10d74dd0d8c9a8f40e (patch) | |
tree | 795ec36c69ef1b946d2e34ec39cad82c174b1d0b /test | |
parent | cf974fd103dbb56313eee40ce9ffe4d03d6c1b04 (diff) | |
download | dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar.gz dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar.bz2 dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar.lz dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar.xz dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.tar.zst dexon-solidity-4bfe09897e3346038b95eb10d74dd0d8c9a8f40e.zip |
Make fallback function throw by default.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/Assembly.cpp | 2 | ||||
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/test/libsolidity/Assembly.cpp b/test/libsolidity/Assembly.cpp index 557d496a..81332f4f 100644 --- a/test/libsolidity/Assembly.cpp +++ b/test/libsolidity/Assembly.cpp @@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(location_test) shared_ptr<string const> n = make_shared<string>("source"); AssemblyItems items = compileContract(sourceCode); vector<SourceLocation> locations = - vector<SourceLocation>(17, SourceLocation(2, 75, n)) + + vector<SourceLocation>(18, SourceLocation(2, 75, n)) + vector<SourceLocation>(28, SourceLocation(20, 72, n)) + vector<SourceLocation>{SourceLocation(42, 51, n), SourceLocation(65, 67, n)} + vector<SourceLocation>(4, SourceLocation(58, 67, n)) + diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 8a61907a..14bf28a9 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -2053,6 +2053,7 @@ BOOST_AUTO_TEST_CASE(contracts_as_addresses) { char const* sourceCode = R"( contract helper { + function() { } // can receive ether } contract test { helper h; @@ -5943,6 +5944,7 @@ BOOST_AUTO_TEST_CASE(reject_ether_sent_to_library) function f(address x) returns (bool) { return x.send(1); } + function () {} } )"; compileAndRun(sourceCode, 0, "lib"); |