aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-28 20:39:04 +0800
committerChristian <c@ethdev.com>2015-01-28 20:39:04 +0800
commit77374a46cef6308c58465f5197919d9ac67cb666 (patch)
treee1d319d59f326702451b0c6a895d298491bcd42f /SolidityEndToEndTest.cpp
parentf9109f2eea0f84e37b42d7ec635e97732e1c1d93 (diff)
downloaddexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar.gz
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar.bz2
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar.lz
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar.xz
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.tar.zst
dexon-solidity-77374a46cef6308c58465f5197919d9ac67cb666.zip
Cleaner solution to provide standard sources.
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-rw-r--r--SolidityEndToEndTest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 97f444d2..23cd4f6d 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -1862,6 +1862,21 @@ BOOST_AUTO_TEST_CASE(function_modifier_for_constructor)
BOOST_CHECK(callContractFunction("getData()") == encodeArgs(4 | 2));
}
+BOOST_AUTO_TEST_CASE(use_std_lib)
+{
+ char const* sourceCode = R"(
+ import "mortal";
+ contract Icarus is mortal { }
+ )";
+ u256 amount(130);
+ u160 address(23);
+ compileAndRun(sourceCode, amount, "Icarus");
+ u256 balanceBefore = m_state.balance(m_sender);
+ BOOST_CHECK(callContractFunction("kill()") == bytes());
+ BOOST_CHECK(!m_state.addressHasCode(m_contractAddress));
+ BOOST_CHECK(m_state.balance(m_sender) > balanceBefore);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}