From 92cb4acd8a748ef2cf6a00a5a9f41975c23127c2 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 27 Jun 2018 15:00:34 +0200 Subject: Also mention regular abi.encode in error message. --- .../syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol | 6 +++--- .../syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol | 6 +++--- .../syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol | 6 +++--- .../syntaxTests/specialFunctions/single_non_bytes_arg.sol | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'test') diff --git a/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol index 18d3f63b..4857bc2e 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/keccak256_with_wrong_arg_count.sol @@ -6,6 +6,6 @@ contract C { } } // ---- -// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. +// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. diff --git a/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol index d6f7be58..da41fccd 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/ripemd160_with_wrong_arg_count.sol @@ -6,6 +6,6 @@ contract C { } } // ---- -// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. +// TypeError: (55-66): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (100-107): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (132-159): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. diff --git a/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol b/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol index 32ada223..2939e7fc 100644 --- a/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol +++ b/test/libsolidity/syntaxTests/globalFunctions/sha256_with_wrong_arg_count.sol @@ -6,6 +6,6 @@ contract C { } } // ---- -// TypeError: (55-63): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (94-101): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (126-150): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. +// TypeError: (55-63): Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (94-101): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (126-150): Wrong argument count for function call: 2 arguments given but expected 1. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. diff --git a/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol b/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol index f931d6cf..c17d0849 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/single_non_bytes_arg.sol @@ -7,6 +7,6 @@ contract C { function g(bytes32) pure internal {} } // ---- -// TypeError: (64-71): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (92-99): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. -// TypeError: (123-130): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to properly encode the values. +// TypeError: (64-71): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (92-99): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. +// TypeError: (123-130): Invalid type for argument in function call. Invalid implicit conversion from uint256 to bytes memory requested. This function requires a single bytes argument. Use abi.encodePacked(...) to obtain the pre-0.5.0 behaviour or abi.encode(...) to use ABI encoding. -- cgit v1.2.3