aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-04-20 08:55:50 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-04-21 00:40:48 +0800
commit0493e3b0534ae165a9de934c327997dc58621256 (patch)
treea0c89bb75318baf17f12816cd0f7ba3870acff57 /test/libsolidity/syntaxTests
parentedd20ebefb7c08c9e0a98e9ec0ff5b4edc0b9b0e (diff)
downloaddexon-solidity-0493e3b0534ae165a9de934c327997dc58621256.tar
dexon-solidity-0493e3b0534ae165a9de934c327997dc58621256.tar.gz
dexon-solidity-0493e3b0534ae165a9de934c327997dc58621256.tar.bz2
dexon-solidity-0493e3b0534ae165a9de934c327997dc58621256.tar.lz
dexon-solidity-0493e3b0534ae165a9de934c327997dc58621256.tar.xz
dexon-solidity-0493e3b0534ae165a9de934c327997dc58621256.tar.zst
dexon-solidity-0493e3b0534ae165a9de934c327997dc58621256.zip
Turn deprecated warnings for sha3/suicide into errors (experimental 0.5.0)
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r--test/libsolidity/syntaxTests/deprecated_functions_050.sol13
-rw-r--r--test/libsolidity/syntaxTests/tight_packing_literals_050.sol2
2 files changed, 14 insertions, 1 deletions
diff --git a/test/libsolidity/syntaxTests/deprecated_functions_050.sol b/test/libsolidity/syntaxTests/deprecated_functions_050.sol
new file mode 100644
index 00000000..7e36543b
--- /dev/null
+++ b/test/libsolidity/syntaxTests/deprecated_functions_050.sol
@@ -0,0 +1,13 @@
+pragma experimental "v0.5.0";
+contract test {
+ function f() pure public {
+ bytes32 x = sha3(uint8(1));
+ x;
+ }
+ function g() public {
+ suicide(1);
+ }
+}
+// ----
+// TypeError: (88-102): "sha3" has been deprecated in favour of "keccak256"
+// TypeError: (137-147): "suicide" has been deprecated in favour of "selfdestruct"
diff --git a/test/libsolidity/syntaxTests/tight_packing_literals_050.sol b/test/libsolidity/syntaxTests/tight_packing_literals_050.sol
index 617af543..ef6da75d 100644
--- a/test/libsolidity/syntaxTests/tight_packing_literals_050.sol
+++ b/test/libsolidity/syntaxTests/tight_packing_literals_050.sol
@@ -19,7 +19,7 @@ contract C {
// ----
// TypeError: (117-118): Cannot perform packed encoding for a literal. Please convert it to an explicit type first.
-// Warning: (191-198): "sha3" has been deprecated in favour of "keccak256"
+// TypeError: (191-198): "sha3" has been deprecated in favour of "keccak256"
// TypeError: (196-197): Cannot perform packed encoding for a literal. Please convert it to an explicit type first.
// TypeError: (277-278): Cannot perform packed encoding for a literal. Please convert it to an explicit type first.
// TypeError: (361-362): Cannot perform packed encoding for a literal. Please convert it to an explicit type first.