diff options
author | chriseth <c@ethdev.com> | 2017-01-21 02:11:22 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-21 02:22:39 +0800 |
commit | df4ef74199392e9b29823d68e6a58dabd490e037 (patch) | |
tree | b7cb804f1f57c5b2341c33b18c969e859e52e93a /test/libsolidity/SolidityEndToEndTest.cpp | |
parent | 12b002b3b8575539f332c30691e880bcc2fac5bc (diff) | |
download | dexon-solidity-df4ef74199392e9b29823d68e6a58dabd490e037.tar.gz dexon-solidity-df4ef74199392e9b29823d68e6a58dabd490e037.tar.zst dexon-solidity-df4ef74199392e9b29823d68e6a58dabd490e037.zip |
Add tests for internal constructor.
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 19161831..63a5828e 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -2505,6 +2505,16 @@ BOOST_AUTO_TEST_CASE(constructor_argument_overriding) BOOST_CHECK(callContractFunction("getA()") == encodeArgs(3)); } +BOOST_AUTO_TEST_CASE(internal_constructor) +{ + char const* sourceCode = R"( + contract C { + function C() internal {} + } + )"; + BOOST_CHECK(compileAndRunWithoutCheck(sourceCode, 0, "C").empty()); +} + BOOST_AUTO_TEST_CASE(function_modifier) { char const* sourceCode = R"( |