aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r--crates/ra_syntax/tests/data/lexer/0004_numbers.txt12
-rw-r--r--crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt2
-rw-r--r--crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt38
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.rs (renamed from crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs)0
-rw-r--r--crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.txt (renamed from crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt)13
5 files changed, 44 insertions, 21 deletions
diff --git a/crates/ra_syntax/tests/data/lexer/0004_numbers.txt b/crates/ra_syntax/tests/data/lexer/0004_numbers.txt
index 39988aedc..7bb89b8ae 100644
--- a/crates/ra_syntax/tests/data/lexer/0004_numbers.txt
+++ b/crates/ra_syntax/tests/data/lexer/0004_numbers.txt
@@ -12,9 +12,9 @@ INT_NUMBER 2 "0_"
12WHITESPACE 1 " " 12WHITESPACE 1 " "
13FLOAT_NUMBER 2 "0." 13FLOAT_NUMBER 2 "0."
14WHITESPACE 1 " " 14WHITESPACE 1 " "
15INT_NUMBER 2 "0e" 15FLOAT_NUMBER 2 "0e"
16WHITESPACE 1 " " 16WHITESPACE 1 " "
17INT_NUMBER 2 "0E" 17FLOAT_NUMBER 2 "0E"
18WHITESPACE 1 " " 18WHITESPACE 1 " "
19INT_NUMBER 2 "0z" 19INT_NUMBER 2 "0z"
20WHITESPACE 1 "\n" 20WHITESPACE 1 "\n"
@@ -32,9 +32,9 @@ INT_NUMBER 6 "0_1279"
32WHITESPACE 1 " " 32WHITESPACE 1 " "
33FLOAT_NUMBER 6 "0.1279" 33FLOAT_NUMBER 6 "0.1279"
34WHITESPACE 1 " " 34WHITESPACE 1 " "
35INT_NUMBER 6 "0e1279" 35FLOAT_NUMBER 6 "0e1279"
36WHITESPACE 1 " " 36WHITESPACE 1 " "
37INT_NUMBER 6 "0E1279" 37FLOAT_NUMBER 6 "0E1279"
38WHITESPACE 1 "\n" 38WHITESPACE 1 "\n"
39INT_NUMBER 1 "0" 39INT_NUMBER 1 "0"
40DOT 1 "." 40DOT 1 "."
@@ -47,9 +47,7 @@ IDENT 3 "foo"
47L_PAREN 1 "(" 47L_PAREN 1 "("
48R_PAREN 1 ")" 48R_PAREN 1 ")"
49WHITESPACE 1 "\n" 49WHITESPACE 1 "\n"
50INT_NUMBER 2 "0e" 50FLOAT_NUMBER 4 "0e+1"
51PLUS 1 "+"
52INT_NUMBER 1 "1"
53WHITESPACE 1 "\n" 51WHITESPACE 1 "\n"
54INT_NUMBER 1 "0" 52INT_NUMBER 1 "0"
55DOT 1 "." 53DOT 1 "."
diff --git a/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt b/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt
index 812dfbc18..737a300ee 100644
--- a/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt
+++ b/crates/ra_syntax/tests/data/lexer/0014_unclosed_char.txt
@@ -1 +1 @@
CHAR 2 "\'1" LIFETIME 2 "\'1"
diff --git a/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt b/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt
index 76d186a3c..84867026f 100644
--- a/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt
+++ b/crates/ra_syntax/tests/data/parser/err/0002_duplicate_shebang.txt
@@ -1,7 +1,39 @@
1SOURCE_FILE@[0; 42) 1SOURCE_FILE@[0; 42)
2 SHEBANG@[0; 20) "#!/use/bin/env rusti" 2 SHEBANG@[0; 20) "#!/use/bin/env rusti"
3 WHITESPACE@[20; 21) "\n" 3 WHITESPACE@[20; 21) "\n"
4 ERROR@[21; 41) 4 ATTR@[21; 23)
5 SHEBANG@[21; 41) "#!/use/bin/env rusti" 5 POUND@[21; 22) "#"
6 EXCL@[22; 23) "!"
7 ERROR@[23; 24)
8 SLASH@[23; 24) "/"
9 USE_ITEM@[24; 28)
10 USE_KW@[24; 27) "use"
11 ERROR@[27; 28)
12 SLASH@[27; 28) "/"
13 MACRO_CALL@[28; 31)
14 PATH@[28; 31)
15 PATH_SEGMENT@[28; 31)
16 NAME_REF@[28; 31)
17 IDENT@[28; 31) "bin"
18 ERROR@[31; 32)
19 SLASH@[31; 32) "/"
20 MACRO_CALL@[32; 41)
21 PATH@[32; 35)
22 PATH_SEGMENT@[32; 35)
23 NAME_REF@[32; 35)
24 IDENT@[32; 35) "env"
25 WHITESPACE@[35; 36) " "
26 NAME@[36; 41)
27 IDENT@[36; 41) "rusti"
6 WHITESPACE@[41; 42) "\n" 28 WHITESPACE@[41; 42) "\n"
7error 21: expected an item 29error 23: expected `[`
30error 23: expected an item
31error 27: expected one of `*`, `::`, `{`, `self`, `super` or an indentifier
32error 28: expected SEMI
33error 31: expected EXCL
34error 31: expected `{`, `[`, `(`
35error 31: expected SEMI
36error 31: expected an item
37error 35: expected EXCL
38error 41: expected `{`, `[`, `(`
39error 41: expected SEMI
diff --git a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs b/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.rs
index 261aad1fb..261aad1fb 100644
--- a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs
+++ b/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.rs
diff --git a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt b/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.txt
index b0acfa5d2..4f7e809c5 100644
--- a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt
+++ b/crates/ra_syntax/tests/data/parser/ok/0030_string_suffixes.txt
@@ -11,7 +11,7 @@ SOURCE_FILE@[0; 112)
11 BLOCK@[10; 111) 11 BLOCK@[10; 111)
12 L_CURLY@[10; 11) "{" 12 L_CURLY@[10; 11) "{"
13 WHITESPACE@[11; 16) "\n " 13 WHITESPACE@[11; 16) "\n "
14 LET_STMT@[16; 27) 14 LET_STMT@[16; 31)
15 LET_KW@[16; 19) "let" 15 LET_KW@[16; 19) "let"
16 WHITESPACE@[19; 20) " " 16 WHITESPACE@[19; 20) " "
17 PLACEHOLDER_PAT@[20; 21) 17 PLACEHOLDER_PAT@[20; 21)
@@ -19,14 +19,8 @@ SOURCE_FILE@[0; 112)
19 WHITESPACE@[21; 22) " " 19 WHITESPACE@[21; 22) " "
20 EQ@[22; 23) "=" 20 EQ@[22; 23) "="
21 WHITESPACE@[23; 24) " " 21 WHITESPACE@[23; 24) " "
22 LITERAL@[24; 27) 22 LITERAL@[24; 30)
23 CHAR@[24; 27) "\'c\'" 23 CHAR@[24; 30) "\'c\'u32"
24 EXPR_STMT@[27; 31)
25 PATH_EXPR@[27; 30)
26 PATH@[27; 30)
27 PATH_SEGMENT@[27; 30)
28 NAME_REF@[27; 30)
29 IDENT@[27; 30) "u32"
30 SEMI@[30; 31) ";" 24 SEMI@[30; 31) ";"
31 WHITESPACE@[31; 36) "\n " 25 WHITESPACE@[31; 36) "\n "
32 LET_STMT@[36; 60) 26 LET_STMT@[36; 60)
@@ -67,4 +61,3 @@ SOURCE_FILE@[0; 112)
67 WHITESPACE@[109; 110) "\n" 61 WHITESPACE@[109; 110) "\n"
68 R_CURLY@[110; 111) "}" 62 R_CURLY@[110; 111) "}"
69 WHITESPACE@[111; 112) "\n" 63 WHITESPACE@[111; 112) "\n"
70error 27: expected SEMI