aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-09-06 11:20:57 +0800
committerchriseth <c@ethdev.com>2016-09-06 23:53:13 +0800
commit65c4e65cb3c8bf5ea1139fb7359e053824667c83 (patch)
treeb3ffbfdbb29a29b77a8ea403cf6e155cf9a0af46 /test/libsolidity
parent7af8ecc27ae1643d9f4c5a5ba1c1168efc76c1c6 (diff)
downloaddexon-solidity-65c4e65cb3c8bf5ea1139fb7359e053824667c83.tar.gz
dexon-solidity-65c4e65cb3c8bf5ea1139fb7359e053824667c83.tar.zst
dexon-solidity-65c4e65cb3c8bf5ea1139fb7359e053824667c83.zip
Tests for constructor visibility
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 4de2c126..58736025 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -3999,6 +3999,16 @@ BOOST_AUTO_TEST_CASE(constant_constructor)
BOOST_CHECK(expectError(text, false) == Error::Type::TypeError);
}
+BOOST_AUTO_TEST_CASE(external_constructor)
+{
+ char const* text = R"(
+ contract test {
+ function test() external {}
+ }
+ )";
+ BOOST_CHECK(expectError(text, false) == Error::Type::TypeError);
+}
+
BOOST_AUTO_TEST_SUITE_END()