diff options
Tests for invalid cleanup and missing bool conversion code.
Diffstat (limited to 'test/libsolidity/SolidityNameAndTypeResolution.cpp')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 12 |
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"( |