aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp3
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp15
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()
}