diff options
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/syntaxTests/array/array_pop.sol | 7 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/array_pop_arg.sol | 8 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/bytes_pop.sol | 7 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol | 8 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/array_length_cannot_be_constant_function_parameter.sol (renamed from test/libsolidity/syntaxTests/arrayLength/array_length_cannot_be_constant_function_parameter.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/can_be_constant_in_function.sol (renamed from test/libsolidity/syntaxTests/arrayLength/can_be_constant_in_function.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/can_be_constant_in_struct.sol (renamed from test/libsolidity/syntaxTests/arrayLength/can_be_constant_in_struct.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/can_be_recursive_constant.sol (renamed from test/libsolidity/syntaxTests/arrayLength/can_be_recursive_constant.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/cannot_be_function.sol (renamed from test/libsolidity/syntaxTests/arrayLength/cannot_be_function.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/cannot_be_function_call.sol (renamed from test/libsolidity/syntaxTests/arrayLength/cannot_be_function_call.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol (renamed from test/libsolidity/syntaxTests/arrayLength/complex_cyclic_constant.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/const_cannot_be_fractional.sol (renamed from test/libsolidity/syntaxTests/arrayLength/const_cannot_be_fractional.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/constant_var.sol (renamed from test/libsolidity/syntaxTests/arrayLength/constant_var.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/cyclic_constant.sol (renamed from test/libsolidity/syntaxTests/arrayLength/cyclic_constant.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/inline_array.sol (renamed from test/libsolidity/syntaxTests/arrayLength/inline_array.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/invalid_expression_1.sol (renamed from test/libsolidity/syntaxTests/arrayLength/invalid_expression_1.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/invalid_expression_2.sol (renamed from test/libsolidity/syntaxTests/arrayLength/invalid_expression_2.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/invalid_expression_3.sol (renamed from test/libsolidity/syntaxTests/arrayLength/invalid_expression_3.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/invalid_expression_4.sol (renamed from test/libsolidity/syntaxTests/arrayLength/invalid_expression_4.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol (renamed from test/libsolidity/syntaxTests/arrayLength/invalid_expression_5.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/non_integer_constant_var.sol (renamed from test/libsolidity/syntaxTests/arrayLength/non_integer_constant_var.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/not_convertible_to_integer.sol (renamed from test/libsolidity/syntaxTests/arrayLength/not_convertible_to_integer.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/parentheses.sol (renamed from test/libsolidity/syntaxTests/arrayLength/parentheses.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/pure_functions.sol (renamed from test/libsolidity/syntaxTests/arrayLength/pure_functions.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/too_large.sol (renamed from test/libsolidity/syntaxTests/arrayLength/too_large.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/length/tuples.sol (renamed from test/libsolidity/syntaxTests/arrayLength/tuples.sol) | 0 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/no_array_pop.sol | 8 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/static_storage_array_pop.sol | 8 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/array/string_pop.sol | 8 |
29 files changed, 54 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/array/array_pop.sol b/test/libsolidity/syntaxTests/array/array_pop.sol new file mode 100644 index 00000000..3804f911 --- /dev/null +++ b/test/libsolidity/syntaxTests/array/array_pop.sol @@ -0,0 +1,7 @@ +contract C { + uint[] data; + function test() public { + data.pop(); + } +} +// ---- diff --git a/test/libsolidity/syntaxTests/array/array_pop_arg.sol b/test/libsolidity/syntaxTests/array/array_pop_arg.sol new file mode 100644 index 00000000..bb7803e2 --- /dev/null +++ b/test/libsolidity/syntaxTests/array/array_pop_arg.sol @@ -0,0 +1,8 @@ +contract C { + uint[] data; + function test() public { + data.pop(5); + } +} +// ---- +// TypeError: (65-76): Wrong argument count for function call: 1 arguments given but expected 0. diff --git a/test/libsolidity/syntaxTests/array/bytes_pop.sol b/test/libsolidity/syntaxTests/array/bytes_pop.sol new file mode 100644 index 00000000..cd5aa0eb --- /dev/null +++ b/test/libsolidity/syntaxTests/array/bytes_pop.sol @@ -0,0 +1,7 @@ +contract C { + bytes data; + function test() public { + data.pop(); + } +} +// ---- diff --git a/test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol b/test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol new file mode 100644 index 00000000..5a79afc9 --- /dev/null +++ b/test/libsolidity/syntaxTests/array/dynamic_memory_array_pop.sol @@ -0,0 +1,8 @@ +contract C { + function test() public { + uint[] memory data; + data.pop(); + } +} +// ---- +// TypeError: (74-82): Member "pop" is not available in uint256[] memory outside of storage. diff --git a/test/libsolidity/syntaxTests/arrayLength/array_length_cannot_be_constant_function_parameter.sol b/test/libsolidity/syntaxTests/array/length/array_length_cannot_be_constant_function_parameter.sol index 11d40f26..11d40f26 100644 --- a/test/libsolidity/syntaxTests/arrayLength/array_length_cannot_be_constant_function_parameter.sol +++ b/test/libsolidity/syntaxTests/array/length/array_length_cannot_be_constant_function_parameter.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/can_be_constant_in_function.sol b/test/libsolidity/syntaxTests/array/length/can_be_constant_in_function.sol index 92536dd5..92536dd5 100644 --- a/test/libsolidity/syntaxTests/arrayLength/can_be_constant_in_function.sol +++ b/test/libsolidity/syntaxTests/array/length/can_be_constant_in_function.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/can_be_constant_in_struct.sol b/test/libsolidity/syntaxTests/array/length/can_be_constant_in_struct.sol index 89e174f2..89e174f2 100644 --- a/test/libsolidity/syntaxTests/arrayLength/can_be_constant_in_struct.sol +++ b/test/libsolidity/syntaxTests/array/length/can_be_constant_in_struct.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/can_be_recursive_constant.sol b/test/libsolidity/syntaxTests/array/length/can_be_recursive_constant.sol index 6810a9d6..6810a9d6 100644 --- a/test/libsolidity/syntaxTests/arrayLength/can_be_recursive_constant.sol +++ b/test/libsolidity/syntaxTests/array/length/can_be_recursive_constant.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/cannot_be_function.sol b/test/libsolidity/syntaxTests/array/length/cannot_be_function.sol index ac3abc4c..ac3abc4c 100644 --- a/test/libsolidity/syntaxTests/arrayLength/cannot_be_function.sol +++ b/test/libsolidity/syntaxTests/array/length/cannot_be_function.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/cannot_be_function_call.sol b/test/libsolidity/syntaxTests/array/length/cannot_be_function_call.sol index a6863955..a6863955 100644 --- a/test/libsolidity/syntaxTests/arrayLength/cannot_be_function_call.sol +++ b/test/libsolidity/syntaxTests/array/length/cannot_be_function_call.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/complex_cyclic_constant.sol b/test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol index 254f9f02..254f9f02 100644 --- a/test/libsolidity/syntaxTests/arrayLength/complex_cyclic_constant.sol +++ b/test/libsolidity/syntaxTests/array/length/complex_cyclic_constant.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/const_cannot_be_fractional.sol b/test/libsolidity/syntaxTests/array/length/const_cannot_be_fractional.sol index 397bbbcd..397bbbcd 100644 --- a/test/libsolidity/syntaxTests/arrayLength/const_cannot_be_fractional.sol +++ b/test/libsolidity/syntaxTests/array/length/const_cannot_be_fractional.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/constant_var.sol b/test/libsolidity/syntaxTests/array/length/constant_var.sol index 41750250..41750250 100644 --- a/test/libsolidity/syntaxTests/arrayLength/constant_var.sol +++ b/test/libsolidity/syntaxTests/array/length/constant_var.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/cyclic_constant.sol b/test/libsolidity/syntaxTests/array/length/cyclic_constant.sol index 91ba9045..91ba9045 100644 --- a/test/libsolidity/syntaxTests/arrayLength/cyclic_constant.sol +++ b/test/libsolidity/syntaxTests/array/length/cyclic_constant.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/inline_array.sol b/test/libsolidity/syntaxTests/array/length/inline_array.sol index a30745d3..a30745d3 100644 --- a/test/libsolidity/syntaxTests/arrayLength/inline_array.sol +++ b/test/libsolidity/syntaxTests/array/length/inline_array.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_1.sol b/test/libsolidity/syntaxTests/array/length/invalid_expression_1.sol index c92861eb..c92861eb 100644 --- a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_1.sol +++ b/test/libsolidity/syntaxTests/array/length/invalid_expression_1.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_2.sol b/test/libsolidity/syntaxTests/array/length/invalid_expression_2.sol index 92e3c3cf..92e3c3cf 100644 --- a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_2.sol +++ b/test/libsolidity/syntaxTests/array/length/invalid_expression_2.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_3.sol b/test/libsolidity/syntaxTests/array/length/invalid_expression_3.sol index 26add45c..26add45c 100644 --- a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_3.sol +++ b/test/libsolidity/syntaxTests/array/length/invalid_expression_3.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_4.sol b/test/libsolidity/syntaxTests/array/length/invalid_expression_4.sol index a0d58f4a..a0d58f4a 100644 --- a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_4.sol +++ b/test/libsolidity/syntaxTests/array/length/invalid_expression_4.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_5.sol b/test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol index 38a80867..38a80867 100644 --- a/test/libsolidity/syntaxTests/arrayLength/invalid_expression_5.sol +++ b/test/libsolidity/syntaxTests/array/length/invalid_expression_5.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/non_integer_constant_var.sol b/test/libsolidity/syntaxTests/array/length/non_integer_constant_var.sol index 7a853a34..7a853a34 100644 --- a/test/libsolidity/syntaxTests/arrayLength/non_integer_constant_var.sol +++ b/test/libsolidity/syntaxTests/array/length/non_integer_constant_var.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/not_convertible_to_integer.sol b/test/libsolidity/syntaxTests/array/length/not_convertible_to_integer.sol index b44ccfe9..b44ccfe9 100644 --- a/test/libsolidity/syntaxTests/arrayLength/not_convertible_to_integer.sol +++ b/test/libsolidity/syntaxTests/array/length/not_convertible_to_integer.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/parentheses.sol b/test/libsolidity/syntaxTests/array/length/parentheses.sol index 40f55ad6..40f55ad6 100644 --- a/test/libsolidity/syntaxTests/arrayLength/parentheses.sol +++ b/test/libsolidity/syntaxTests/array/length/parentheses.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/pure_functions.sol b/test/libsolidity/syntaxTests/array/length/pure_functions.sol index b620db76..b620db76 100644 --- a/test/libsolidity/syntaxTests/arrayLength/pure_functions.sol +++ b/test/libsolidity/syntaxTests/array/length/pure_functions.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/too_large.sol b/test/libsolidity/syntaxTests/array/length/too_large.sol index c90a7494..c90a7494 100644 --- a/test/libsolidity/syntaxTests/arrayLength/too_large.sol +++ b/test/libsolidity/syntaxTests/array/length/too_large.sol diff --git a/test/libsolidity/syntaxTests/arrayLength/tuples.sol b/test/libsolidity/syntaxTests/array/length/tuples.sol index bc10b3b5..bc10b3b5 100644 --- a/test/libsolidity/syntaxTests/arrayLength/tuples.sol +++ b/test/libsolidity/syntaxTests/array/length/tuples.sol diff --git a/test/libsolidity/syntaxTests/array/no_array_pop.sol b/test/libsolidity/syntaxTests/array/no_array_pop.sol new file mode 100644 index 00000000..44e54ad2 --- /dev/null +++ b/test/libsolidity/syntaxTests/array/no_array_pop.sol @@ -0,0 +1,8 @@ +contract C { + uint data; + function test() public { + data.pop(); + } +} +// ---- +// TypeError: (63-71): Member "pop" not found or not visible after argument-dependent lookup in uint256 diff --git a/test/libsolidity/syntaxTests/array/static_storage_array_pop.sol b/test/libsolidity/syntaxTests/array/static_storage_array_pop.sol new file mode 100644 index 00000000..0af171ad --- /dev/null +++ b/test/libsolidity/syntaxTests/array/static_storage_array_pop.sol @@ -0,0 +1,8 @@ +contract C { + uint[3] data; + function test() public { + data.pop(); + } +} +// ---- +// TypeError: (66-74): Member "pop" not found or not visible after argument-dependent lookup in uint256[3] storage ref diff --git a/test/libsolidity/syntaxTests/array/string_pop.sol b/test/libsolidity/syntaxTests/array/string_pop.sol new file mode 100644 index 00000000..2a46d0c3 --- /dev/null +++ b/test/libsolidity/syntaxTests/array/string_pop.sol @@ -0,0 +1,8 @@ +contract C { + string data; + function test() public { + data.pop(); + } +} +// ---- +// TypeError: (65-73): Member "pop" not found or not visible after argument-dependent lookup in string storage ref |