aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-07-24 06:49:27 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-07-25 01:35:47 +0800
commit3e17438c41ab8fa1a4d1ebd0f83215a42832330a (patch)
tree78a9f5ccae64863b72a8f04b06688b0842c282c3 /test/libsolidity/syntaxTests
parentfc68d22ba4f98bc9cd44d3c8e6376cba21b528d6 (diff)
downloaddexon-solidity-3e17438c41ab8fa1a4d1ebd0f83215a42832330a.tar
dexon-solidity-3e17438c41ab8fa1a4d1ebd0f83215a42832330a.tar.gz
dexon-solidity-3e17438c41ab8fa1a4d1ebd0f83215a42832330a.tar.bz2
dexon-solidity-3e17438c41ab8fa1a4d1ebd0f83215a42832330a.tar.lz
dexon-solidity-3e17438c41ab8fa1a4d1ebd0f83215a42832330a.tar.xz
dexon-solidity-3e17438c41ab8fa1a4d1ebd0f83215a42832330a.tar.zst
dexon-solidity-3e17438c41ab8fa1a4d1ebd0f83215a42832330a.zip
Add syntax tests for unknown / invalid pragma
Diffstat (limited to 'test/libsolidity/syntaxTests')
-rw-r--r--test/libsolidity/syntaxTests/pragma/invalid_pragma.sol3
-rw-r--r--test/libsolidity/syntaxTests/pragma/unknown_pragma.sol3
2 files changed, 6 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/pragma/invalid_pragma.sol b/test/libsolidity/syntaxTests/pragma/invalid_pragma.sol
new file mode 100644
index 00000000..cb2585ba
--- /dev/null
+++ b/test/libsolidity/syntaxTests/pragma/invalid_pragma.sol
@@ -0,0 +1,3 @@
+pragma 0;
+// ----
+// SyntaxError: (0-9): Invalid pragma "0"
diff --git a/test/libsolidity/syntaxTests/pragma/unknown_pragma.sol b/test/libsolidity/syntaxTests/pragma/unknown_pragma.sol
new file mode 100644
index 00000000..3a48eddd
--- /dev/null
+++ b/test/libsolidity/syntaxTests/pragma/unknown_pragma.sol
@@ -0,0 +1,3 @@
+pragma thisdoesntexist;
+// ----
+// SyntaxError: (0-23): Unknown pragma "thisdoesntexist"