aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-07-25 02:58:35 +0800
committerGitHub <noreply@github.com>2018-07-25 02:58:35 +0800
commitae0959ae125ac2ae7084041a87c0736a8e7df6c6 (patch)
tree78a9f5ccae64863b72a8f04b06688b0842c282c3
parentfc68d22ba4f98bc9cd44d3c8e6376cba21b528d6 (diff)
parent3e17438c41ab8fa1a4d1ebd0f83215a42832330a (diff)
downloaddexon-solidity-ae0959ae125ac2ae7084041a87c0736a8e7df6c6.tar.gz
dexon-solidity-ae0959ae125ac2ae7084041a87c0736a8e7df6c6.tar.zst
dexon-solidity-ae0959ae125ac2ae7084041a87c0736a8e7df6c6.zip
Merge pull request #4553 from ethereum/pragma-tests
Add syntax tests for unknown / invalid pragma
-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"