diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-07-25 03:22:46 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-07-25 18:01:41 +0800 |
commit | 7b5e9128747ff6f8775cdd2aa2029039f9850c2b (patch) | |
tree | 4093a38b4d5bf7662e5db138fc4b34a41179efcc /test/libsolidity | |
parent | 49573bad46f7c108bd3a00ec785f7da6a0066530 (diff) | |
download | dexon-solidity-7b5e9128747ff6f8775cdd2aa2029039f9850c2b.tar.gz dexon-solidity-7b5e9128747ff6f8775cdd2aa2029039f9850c2b.tar.zst dexon-solidity-7b5e9128747ff6f8775cdd2aa2029039f9850c2b.zip |
Add syntax tests for import statements
Diffstat (limited to 'test/libsolidity')
5 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/parsing/import_complex.sol b/test/libsolidity/syntaxTests/parsing/import_complex.sol new file mode 100644 index 00000000..8bbb0a88 --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/import_complex.sol @@ -0,0 +1,3 @@ +import {hello, world} from "hello"; +// ---- +// ParserError: (0-35): Source "hello" not found: File not supplied initially. diff --git a/test/libsolidity/syntaxTests/parsing/import_complex_invalid_from.sol b/test/libsolidity/syntaxTests/parsing/import_complex_invalid_from.sol new file mode 100644 index 00000000..c4667606 --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/import_complex_invalid_from.sol @@ -0,0 +1,3 @@ +import {hello, world} from function; +// ---- +// ParserError: (27-35): Expected import path. diff --git a/test/libsolidity/syntaxTests/parsing/import_complex_without_from.sol b/test/libsolidity/syntaxTests/parsing/import_complex_without_from.sol new file mode 100644 index 00000000..961acb22 --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/import_complex_without_from.sol @@ -0,0 +1,3 @@ +import {hello, world}; +// ---- +// ParserError: (21-22): Expected "from". diff --git a/test/libsolidity/syntaxTests/parsing/import_invalid_token.sol b/test/libsolidity/syntaxTests/parsing/import_invalid_token.sol new file mode 100644 index 00000000..df837e28 --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/import_invalid_token.sol @@ -0,0 +1,3 @@ +import function; +// ---- +// ParserError: (7-15): Expected string literal (path), "*" or alias list. diff --git a/test/libsolidity/syntaxTests/parsing/import_simple.sol b/test/libsolidity/syntaxTests/parsing/import_simple.sol new file mode 100644 index 00000000..5d61a8bb --- /dev/null +++ b/test/libsolidity/syntaxTests/parsing/import_simple.sol @@ -0,0 +1,3 @@ +import "hello"; +// ---- +// ParserError: (0-15): Source "hello" not found: File not supplied initially. |