diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/parser/ok/0024_const_fn.rs | 5 | ||||
-rw-r--r-- | tests/data/parser/ok/0024_const_fn.txt | 29 | ||||
-rw-r--r-- | tests/data/parser/ok/0025_const_item.rs | 2 | ||||
-rw-r--r-- | tests/data/parser/ok/0025_const_item.txt | 31 |
4 files changed, 67 insertions, 0 deletions
diff --git a/tests/data/parser/ok/0024_const_fn.rs b/tests/data/parser/ok/0024_const_fn.rs new file mode 100644 index 000000000..eba9322a1 --- /dev/null +++ b/tests/data/parser/ok/0024_const_fn.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | const fn foo() { | ||
2 | } | ||
3 | |||
4 | const unsafe fn foo() { | ||
5 | } | ||
diff --git a/tests/data/parser/ok/0024_const_fn.txt b/tests/data/parser/ok/0024_const_fn.txt new file mode 100644 index 000000000..0fd485997 --- /dev/null +++ b/tests/data/parser/ok/0024_const_fn.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | FILE@[0; 46) | ||
2 | FN_ITEM@[0; 20) | ||
3 | CONST_KW@[0; 5) | ||
4 | WHITESPACE@[5; 6) | ||
5 | FN_KW@[6; 8) | ||
6 | WHITESPACE@[8; 9) | ||
7 | IDENT@[9; 12) "foo" | ||
8 | L_PAREN@[12; 13) | ||
9 | R_PAREN@[13; 14) | ||
10 | WHITESPACE@[14; 15) | ||
11 | L_CURLY@[15; 16) | ||
12 | WHITESPACE@[16; 17) | ||
13 | R_CURLY@[17; 18) | ||
14 | WHITESPACE@[18; 20) | ||
15 | FN_ITEM@[20; 46) | ||
16 | CONST_KW@[20; 25) | ||
17 | WHITESPACE@[25; 26) | ||
18 | UNSAFE_KW@[26; 32) | ||
19 | WHITESPACE@[32; 33) | ||
20 | FN_KW@[33; 35) | ||
21 | WHITESPACE@[35; 36) | ||
22 | IDENT@[36; 39) "foo" | ||
23 | L_PAREN@[39; 40) | ||
24 | R_PAREN@[40; 41) | ||
25 | WHITESPACE@[41; 42) | ||
26 | L_CURLY@[42; 43) | ||
27 | WHITESPACE@[43; 44) | ||
28 | R_CURLY@[44; 45) | ||
29 | WHITESPACE@[45; 46) | ||
diff --git a/tests/data/parser/ok/0025_const_item.rs b/tests/data/parser/ok/0025_const_item.rs new file mode 100644 index 000000000..7446859b5 --- /dev/null +++ b/tests/data/parser/ok/0025_const_item.rs | |||
@@ -0,0 +1,2 @@ | |||
1 | const FOO: u32 = 92; | ||
2 | const mut BAR: u32 = 62; | ||
diff --git a/tests/data/parser/ok/0025_const_item.txt b/tests/data/parser/ok/0025_const_item.txt new file mode 100644 index 000000000..588e001f5 --- /dev/null +++ b/tests/data/parser/ok/0025_const_item.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | FILE@[0; 46) | ||
2 | CONST_ITEM@[0; 21) | ||
3 | CONST_KW@[0; 5) | ||
4 | WHITESPACE@[5; 6) | ||
5 | IDENT@[6; 9) "FOO" | ||
6 | COLON@[9; 10) | ||
7 | WHITESPACE@[10; 11) | ||
8 | IDENT@[11; 14) "u32" | ||
9 | WHITESPACE@[14; 15) | ||
10 | EQ@[15; 16) | ||
11 | LITERAL@[16; 19) | ||
12 | WHITESPACE@[16; 17) | ||
13 | INT_NUMBER@[17; 19) | ||
14 | SEMI@[19; 20) | ||
15 | WHITESPACE@[20; 21) | ||
16 | CONST_ITEM@[21; 46) | ||
17 | CONST_KW@[21; 26) | ||
18 | WHITESPACE@[26; 27) | ||
19 | MUT_KW@[27; 30) | ||
20 | WHITESPACE@[30; 31) | ||
21 | IDENT@[31; 34) "BAR" | ||
22 | COLON@[34; 35) | ||
23 | WHITESPACE@[35; 36) | ||
24 | IDENT@[36; 39) "u32" | ||
25 | WHITESPACE@[39; 40) | ||
26 | EQ@[40; 41) | ||
27 | LITERAL@[41; 44) | ||
28 | WHITESPACE@[41; 42) | ||
29 | INT_NUMBER@[42; 44) | ||
30 | SEMI@[44; 45) | ||
31 | WHITESPACE@[45; 46) | ||