diff options
author | chriseth <c@ethdev.com> | 2016-10-21 18:30:48 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-10-24 22:43:08 +0800 |
commit | 6b028701a0dfd239ddfcf9e4d40bfe36414a956f (patch) | |
tree | 9d0f3ee6b78ae49851cba4cc0c3f347379ddbf60 /test | |
parent | 22f2c6df6316b1281753e1c626ad5523e8917246 (diff) | |
download | dexon-solidity-6b028701a0dfd239ddfcf9e4d40bfe36414a956f.tar.gz dexon-solidity-6b028701a0dfd239ddfcf9e4d40bfe36414a956f.tar.zst dexon-solidity-6b028701a0dfd239ddfcf9e4d40bfe36414a956f.zip |
Test.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 44ac1511..f7ac73ae 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -4175,7 +4175,7 @@ BOOST_AUTO_TEST_CASE(inline_assembly_in_modifier) modifier m { uint a = 1; assembly { - a := 2 + a := 2 } _; } @@ -4193,7 +4193,7 @@ BOOST_AUTO_TEST_CASE(inline_assembly_storage) uint x = 1; function f() { assembly { - x := 2 + x := 2 } } } @@ -4208,7 +4208,7 @@ BOOST_AUTO_TEST_CASE(inline_assembly_storage_in_modifiers) uint x = 1; modifier m { assembly { - x := 2 + x := 2 } _; } @@ -4219,6 +4219,19 @@ BOOST_AUTO_TEST_CASE(inline_assembly_storage_in_modifiers) BOOST_CHECK(expectError(text, false) == Error::Type::DeclarationError); } +BOOST_AUTO_TEST_CASE(invalid_mobile_type) +{ + char const* text = R"( + contract C { + function f() { + // Invalid number + [1, 78901234567890123456789012345678901234567890123456789345678901234567890012345678012345678901234567]; + } + } + )"; + BOOST_CHECK(expectError(text, false) == Error::Type::TypeError); +} + BOOST_AUTO_TEST_SUITE_END() } |