diff options
author | LianaHus <liana@ethdev.com> | 2015-09-15 17:41:40 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-09-15 17:41:40 +0800 |
commit | 9d44e659321cad4fe9955895d8487bf4a089ae92 (patch) | |
tree | e3d3aada93c5f13ea5584d541ccfc864ef3be3aa /test/libsolidity | |
parent | 466f5a4b88b4f317e8a4d9b5734fd938d4e01e80 (diff) | |
download | dexon-solidity-9d44e659321cad4fe9955895d8487bf4a089ae92.tar dexon-solidity-9d44e659321cad4fe9955895d8487bf4a089ae92.tar.gz dexon-solidity-9d44e659321cad4fe9955895d8487bf4a089ae92.tar.bz2 dexon-solidity-9d44e659321cad4fe9955895d8487bf4a089ae92.tar.lz dexon-solidity-9d44e659321cad4fe9955895d8487bf4a089ae92.tar.xz dexon-solidity-9d44e659321cad4fe9955895d8487bf4a089ae92.tar.zst dexon-solidity-9d44e659321cad4fe9955895d8487bf4a089ae92.zip |
moved the test
Conflicts:
test/libsolidity/SolidityEndToEndTest.cpp
test/libsolidity/SolidityNameAndTypeResolution.cpp
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 3 | ||||
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 8f94cba1..05508e2b 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -5233,6 +5233,7 @@ BOOST_AUTO_TEST_CASE(storage_string_as_mapping_key_without_variable) BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(2))); } +<<<<<<< HEAD BOOST_AUTO_TEST_CASE(library_call) { char const* sourceCode = R"( @@ -5279,6 +5280,8 @@ BOOST_AUTO_TEST_CASE(array_out_of_bound_access) compileRequireThrow<TypeError>(sourceCode); } +======= +>>>>>>> 6920415... moved the test BOOST_AUTO_TEST_SUITE_END() } diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 5d174367..f671c5ec 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -2250,10 +2250,23 @@ BOOST_AUTO_TEST_CASE(creating_contract_within_the_contract) function f() { var x = new Test(); } } )"; - BOOST_CHECK_THROW(parseTextAndResolveNames(sourceCode), TypeError); } +BOOST_AUTO_TEST_CASE(array_out_of_bound_access) +{ + char const* text = R"( + contract c { + uint[2] dataArray; + function set5th() returns (bool) { + dataArray[5] = 2; + return true; + } + } + )"; + BOOST_CHECK_THROW(parseTextAndResolveNames(text), TypeError); +} + BOOST_AUTO_TEST_SUITE_END() } |