From 6d26ad1e61cd6d711332cf3f9df87917157b6a3f Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 23 Apr 2018 14:56:40 +0100 Subject: Extract subdenomination tests --- .../syntaxTests/denominations/combining_hex_and_denomination.sol | 5 +++++ .../denominations/combining_hex_and_denomination_050.sol | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination.sol create mode 100644 test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination_050.sol (limited to 'test/libsolidity/syntaxTests') diff --git a/test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination.sol b/test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination.sol new file mode 100644 index 00000000..3571e8a9 --- /dev/null +++ b/test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination.sol @@ -0,0 +1,5 @@ +contract C { + uint constant x = 0x01 wei; +} +// ---- +// Warning: (32-40): Hexadecimal numbers with unit denominations are deprecated. You can use an expression of the form "0x1234 * 1 day" instead. diff --git a/test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination_050.sol b/test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination_050.sol new file mode 100644 index 00000000..98865999 --- /dev/null +++ b/test/libsolidity/syntaxTests/denominations/combining_hex_and_denomination_050.sol @@ -0,0 +1,6 @@ +pragma experimental "v0.5.0"; +contract C { + uint constant x = 0x01 wei; +} +// ---- +// TypeError: (62-70): Hexadecimal numbers cannot be used with unit denominations. You can use an expression of the form "0x1234 * 1 day" instead. -- cgit