diff options
author | Jason Cobb <jason.e.cobb@gmail.com> | 2018-05-31 05:02:47 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-25 22:17:50 +0800 |
commit | 98c9ca257568e8f281a5d8857a45ef2c8aef2c77 (patch) | |
tree | 728ebe462c3ec65a90e44d7c3d6558a03418de6b /test/libsolidity/syntaxTests | |
parent | 48b003d4d4e4ebddf8922fb06a47c1634203d0bc (diff) | |
download | dexon-solidity-98c9ca257568e8f281a5d8857a45ef2c8aef2c77.tar.gz dexon-solidity-98c9ca257568e8f281a5d8857a45ef2c8aef2c77.tar.zst dexon-solidity-98c9ca257568e8f281a5d8857a45ef2c8aef2c77.zip |
Update tests for strict address literals
Diffstat (limited to 'test/libsolidity/syntaxTests')
7 files changed, 10 insertions, 11 deletions
diff --git a/test/libsolidity/syntaxTests/deprecated_functions.sol b/test/libsolidity/syntaxTests/deprecated_functions.sol index ff3af7d2..99ca4542 100644 --- a/test/libsolidity/syntaxTests/deprecated_functions.sol +++ b/test/libsolidity/syntaxTests/deprecated_functions.sol @@ -4,9 +4,9 @@ contract test { x; } function g() public { - suicide(1); + suicide(0x0000000000000000000000000000000000000001); } } // ---- // TypeError: (58-64): "sha3" has been deprecated in favour of "keccak256" -// TypeError: (99-109): "suicide" has been deprecated in favour of "selfdestruct" +// TypeError: (99-150): "suicide" has been deprecated in favour of "selfdestruct" diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol index 8084e0d1..7f59f2f6 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/406_invalid_address_checksum.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// Warning: (64-106): This looks like an address but has an invalid checksum. If this is not used as an address, please prepend '00'. Correct checksummed address: '0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals +// SyntaxError: (64-106): This looks like an address but has an invalid checksum. If this is not used as an address, please prepend '00'. Correct checksummed address: '0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol index 51521fe6..5377d256 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/407_invalid_address_no_checksum.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// Warning: (64-106): This looks like an address but has an invalid checksum. If this is not used as an address, please prepend '00'. Correct checksummed address: '0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals +// SyntaxError: (64-106): This looks like an address but has an invalid checksum. If this is not used as an address, please prepend '00'. Correct checksummed address: '0xfA0bFc97E48458494Ccd857e1A85DC91F7F0046E'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol index 4dd93c63..ad1d646c 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/408_invalid_address_length_short.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// Warning: (64-105): This looks like an address but has an invalid checksum. If this is not used as an address, please prepend '00'. Correct checksummed address: '0x0A0BfC97E48458494ccD857e1A85Dc91f7f0046e'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals +// SyntaxError: (64-105): This looks like an address but is not exactly 40 hex digits. It is 39 hex digits. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol index 37c6aa05..e22f12e0 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/409_invalid_address_length_long.sol @@ -5,5 +5,4 @@ contract C { } } // ---- -// Warning: (64-107): This looks like an address but has an invalid checksum. If this is not used as an address, please prepend '00'. For more information please see https://solidity.readthedocs.io/en/develop/types.html#address-literals -// TypeError: (52-107): Type int_const 2284...(42 digits omitted)...9360 is not implicitly convertible to expected type address. +// SyntaxError: (64-107): This looks like an address but is not exactly 40 hex digits. It is 41 hex digits. diff --git a/test/libsolidity/syntaxTests/parsing/else_if_statement.sol b/test/libsolidity/syntaxTests/parsing/else_if_statement.sol index 727e6115..37763697 100644 --- a/test/libsolidity/syntaxTests/parsing/else_if_statement.sol +++ b/test/libsolidity/syntaxTests/parsing/else_if_statement.sol @@ -1,8 +1,8 @@ contract test { - function fun(uint256 a) returns (address b) { + function fun(uint256 a) returns (uint8 b) { if (a < 0) b = 0x67; else if (a == 0) b = 0x12; else b = 0x78; } } // ---- -// Warning: (20-142): No visibility specified. Defaulting to "public". -// Warning: (20-142): Function state mutability can be restricted to pure +// Warning: (20-140): No visibility specified. Defaulting to "public". +// Warning: (20-140): Function state mutability can be restricted to pure diff --git a/test/libsolidity/syntaxTests/parsing/modifier.sol b/test/libsolidity/syntaxTests/parsing/modifier.sol index 3e659dcf..b995ce89 100644 --- a/test/libsolidity/syntaxTests/parsing/modifier.sol +++ b/test/libsolidity/syntaxTests/parsing/modifier.sol @@ -1,3 +1,3 @@ contract c { - modifier mod { if (msg.sender == 0) _; } + modifier mod { if (msg.sender == 0x0000000000000000000000000000000000000000) _; } } |