aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityNameAndTypeResolution.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-05-20 22:44:03 +0800
committerchriseth <c@ethdev.com>2016-05-20 22:52:38 +0800
commita09583a2a49344034e8be22be91a4410f2982781 (patch)
treeeca575a147ae3005fc648e26bc45963ba189078d /test/libsolidity/SolidityNameAndTypeResolution.cpp
parente3c54185434e16591e15e94b9f0cbef49c83137c (diff)
downloaddexon-solidity-a09583a2a49344034e8be22be91a4410f2982781.tar
dexon-solidity-a09583a2a49344034e8be22be91a4410f2982781.tar.gz
dexon-solidity-a09583a2a49344034e8be22be91a4410f2982781.tar.bz2
dexon-solidity-a09583a2a49344034e8be22be91a4410f2982781.tar.lz
dexon-solidity-a09583a2a49344034e8be22be91a4410f2982781.tar.xz
dexon-solidity-a09583a2a49344034e8be22be91a4410f2982781.tar.zst
dexon-solidity-a09583a2a49344034e8be22be91a4410f2982781.zip
Tests for invalid cleanup and missing bool conversion code.
Diffstat (limited to 'test/libsolidity/SolidityNameAndTypeResolution.cpp')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index bbc77d34..52e0bf58 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -3683,6 +3683,18 @@ BOOST_AUTO_TEST_CASE(zero_handling)
BOOST_CHECK(success(text));
}
+BOOST_AUTO_TEST_CASE(missing_bool_conversion)
+{
+ char const* text = R"(
+ contract test {
+ function b(uint a) {
+ bool(a == 1);
+ }
+ }
+ )";
+ BOOST_CHECK(success(text));
+}
+
BOOST_AUTO_TEST_CASE(integer_and_fixed_interaction)
{
char const* text = R"(