aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-05-21 19:02:24 +0800
committerLiana Husikyan <liana@ethdev.com>2015-06-01 19:06:12 +0800
commit82dc10d492d74fc1a9e07549f39d5ef2230822cc (patch)
treeda53b7f482860dbb0f24dc4af22325754e97ea33 /libsolidity
parent4a2f18b41a9977045a7bd5e859f96715e7f27e84 (diff)
downloaddexon-solidity-82dc10d492d74fc1a9e07549f39d5ef2230822cc.tar
dexon-solidity-82dc10d492d74fc1a9e07549f39d5ef2230822cc.tar.gz
dexon-solidity-82dc10d492d74fc1a9e07549f39d5ef2230822cc.tar.bz2
dexon-solidity-82dc10d492d74fc1a9e07549f39d5ef2230822cc.tar.lz
dexon-solidity-82dc10d492d74fc1a9e07549f39d5ef2230822cc.tar.xz
dexon-solidity-82dc10d492d74fc1a9e07549f39d5ef2230822cc.tar.zst
dexon-solidity-82dc10d492d74fc1a9e07549f39d5ef2230822cc.zip
test for exception in constructor
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/SolidityEndToEndTest.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp
index 839ad792..76952c67 100644
--- a/libsolidity/SolidityEndToEndTest.cpp
+++ b/libsolidity/SolidityEndToEndTest.cpp
@@ -4161,6 +4161,23 @@ BOOST_AUTO_TEST_CASE(evm_exceptions_when_calling_non_existing_function)
BOOST_CHECK(callContractFunction("test()") == encodeArgs(0));
}
+BOOST_AUTO_TEST_CASE(evm_exceptions_in_constructor)
+{
+ char const* sourceCode = R"(
+ contract A {
+ uint public test = 0;
+ function A()
+ {
+ this.call("123");
+ test = 1;
+ }
+ }
+ )";
+ compileAndRun(sourceCode, 0, "A");
+
+ BOOST_CHECK(callContractFunction("test()") == encodeArgs(1));
+}
+
BOOST_AUTO_TEST_SUITE_END()
}