diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index f88f600a..90d0e728 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -3938,12 +3938,29 @@ BOOST_AUTO_TEST_CASE(rational_unary_operation) char const* text = R"( contract test { function f() { + ufixed8x16 a = 3.25; + fixed8x16 b = -3.25; + } + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); + text = R"( + contract test { + function f() { ufixed8x16 a = +3.25; fixed8x16 b = -3.25; } } )"; - CHECK_SUCCESS(text); + CHECK_WARNING(text,"Use of unary + is deprecated"); + text = R"( + contract test { + function f(uint x) { + uint y = +x; + } + } + )"; + CHECK_WARNING(text,"Use of unary + is deprecated"); } BOOST_AUTO_TEST_CASE(leading_zero_rationals_convert) |