aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-08-06 20:45:31 +0800
committerGitHub <noreply@github.com>2018-08-06 20:45:31 +0800
commitbc73617f5ebc6d8f254b8e7faa630738c9967bd5 (patch)
treee59020b11b6bb90fa3b2e9d27177c484cd0549b8 /test/libsolidity/syntaxTests/nameAndTypeResolution
parent3481d4e2ec89cd3154ec3b5e41ccc7dec9b52688 (diff)
parent08e431f94e6f8fda05c6507e487dcbbf3c155aae (diff)
downloaddexon-solidity-bc73617f5ebc6d8f254b8e7faa630738c9967bd5.tar
dexon-solidity-bc73617f5ebc6d8f254b8e7faa630738c9967bd5.tar.gz
dexon-solidity-bc73617f5ebc6d8f254b8e7faa630738c9967bd5.tar.bz2
dexon-solidity-bc73617f5ebc6d8f254b8e7faa630738c9967bd5.tar.lz
dexon-solidity-bc73617f5ebc6d8f254b8e7faa630738c9967bd5.tar.xz
dexon-solidity-bc73617f5ebc6d8f254b8e7faa630738c9967bd5.tar.zst
dexon-solidity-bc73617f5ebc6d8f254b8e7faa630738c9967bd5.zip
Merge pull request #4689 from ethereum/cleanup-050-tests
Cleanup 0.5.0 test cases
Diffstat (limited to 'test/libsolidity/syntaxTests/nameAndTypeResolution')
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol7
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol8
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol1
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol3
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol10
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol11
-rw-r--r--test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol9
15 files changed, 9 insertions, 64 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol
deleted file mode 100644
index dc0a6e63..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/166_assigning_state_to_const_variable_050.sol
+++ /dev/null
@@ -1,7 +0,0 @@
-pragma experimental "v0.5.0";
-
-contract C {
- address constant x = msg.sender;
-}
-// ----
-// TypeError: (69-79): Initial value for constant variable has to be compile-time constant.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol
deleted file mode 100644
index c0e29b38..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/352_callcode_deprecated_v050.sol
+++ /dev/null
@@ -1,8 +0,0 @@
-pragma experimental "v0.5.0";
-contract test {
- function f() pure public {
- address(0x12).callcode;
- }
-}
-// ----
-// TypeError: (85-107): "callcode" has been deprecated in favour of "delegatecall".
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol
index 4cda64e7..ca1e15a9 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/375_inline_assembly_unbalanced_two_stack_load.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract c {
uint8 x;
function f() public {
@@ -6,4 +5,4 @@ contract c {
}
}
// ----
-// TypeError: (105-106): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
+// TypeError: (75-76): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol
index d6dcc4d0..0032f99e 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/376_inline_assembly_in_modifier.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
modifier m {
uint a = 1;
@@ -11,4 +10,4 @@ contract test {
}
}
// ----
-// Warning: (152-181): Function state mutability can be restricted to pure
+// Warning: (122-151): Function state mutability can be restricted to pure
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol
index 9a2065e2..3dfb458a 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/377_inline_assembly_storage.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint x = 1;
function f() public {
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// TypeError: (119-120): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
+// TypeError: (89-90): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol
index b99179ef..b9b92d47 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/378_inline_assembly_storage_in_modifiers.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint x = 1;
modifier m {
@@ -11,4 +10,4 @@ contract test {
}
}
// ----
-// TypeError: (110-111): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
+// TypeError: (80-81): Only local variables are supported. To access storage variables, use the _slot and _offset suffixes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol
index 866232dd..c8928804 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/379_inline_assembly_constant_assign.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint constant x = 1;
function f() public {
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// TypeError: (128-129): Constant variables not supported by inline assembly.
+// TypeError: (98-99): Constant variables not supported by inline assembly.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol
index a41858a0..03ff9166 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/380_inline_assembly_constant_access.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint constant x = 1;
function f() public {
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// TypeError: (137-138): Constant variables not supported by inline assembly.
+// TypeError: (107-108): Constant variables not supported by inline assembly.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol
index 93004ef6..877f5783 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/381_inline_assembly_local_variable_access_out_of_functions.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
function f() public {
uint a;
@@ -8,4 +7,4 @@ contract test {
}
}
// ----
-// DeclarationError: (144-145): Cannot access local Solidity variables from inside an inline assembly function.
+// DeclarationError: (114-115): Cannot access local Solidity variables from inside an inline assembly function.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol
index 913ea725..65d614a3 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/382_inline_assembly_local_variable_access_out_of_functions_storage_ptr.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint[] r;
function f() public {
@@ -9,4 +8,4 @@ contract test {
}
}
// ----
-// DeclarationError: (172-180): Cannot access local Solidity variables from inside an inline assembly function.
+// DeclarationError: (142-150): Cannot access local Solidity variables from inside an inline assembly function.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol
index 7528f355..abe9067a 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/383_inline_assembly_storage_variable_access_out_of_functions.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract test {
uint a;
function f() pure public {
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol
index d95fd978..9e324ce1 100644
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol
+++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/385_inline_assembly_calldata_variables.sol
@@ -1,4 +1,3 @@
-pragma experimental "v0.5.0";
contract C {
function f(bytes bytesAsCalldata) external {
assembly {
@@ -7,4 +6,4 @@ contract C {
}
}
// ----
-// TypeError: (132-147): Call data elements cannot be accessed directly. Copy to a local variable first or use "calldataload" or "calldatacopy" with manually determined offsets and sizes.
+// TypeError: (102-117): Call data elements cannot be accessed directly. Copy to a local variable first or use "calldataload" or "calldatacopy" with manually determined offsets and sizes.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol
deleted file mode 100644
index 0c98ada1..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/392_inline_assembly_050_jump.sol
+++ /dev/null
@@ -1,10 +0,0 @@
-pragma experimental "v0.5.0";
-contract C {
- function f() pure public {
- assembly {
- jump(2)
- }
- }
-}
-// ----
-// SyntaxError: (105-112): Jump instructions and labels are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch", "if" or "for" statements instead.
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol
deleted file mode 100644
index f72fe741..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/394_inline_assembly_050_leave_items_on_stack.sol
+++ /dev/null
@@ -1,11 +0,0 @@
-pragma experimental "v0.5.0";
-contract C {
- function f() pure public {
- assembly {
- mload(0)
- }
- }
-}
-// ----
-// SyntaxError: (105-113): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
-// DeclarationError: (91-123): Unbalanced stack at the end of a block: 1 surplus item(s).
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol
deleted file mode 100644
index e148d65a..00000000
--- a/test/libsolidity/syntaxTests/nameAndTypeResolution/564_events_without_emit_deprecated_v050.sol
+++ /dev/null
@@ -1,9 +0,0 @@
-pragma experimental "v0.5.0";
-contract C {
- event e();
- function f() public {
- e();
- }
-}
-// ----
-// TypeError: (92-95): Event invocations have to be prefixed by "emit".