File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,13 @@ fn source_file() {
51
51
52
52
#[ test]
53
53
fn macro_stmt ( ) {
54
+ check (
55
+ TopEntryPoint :: MacroStmts ,
56
+ "" ,
57
+ expect ! [ [ r#"
58
+ MACRO_STMTS
59
+ "# ] ] ,
60
+ ) ;
54
61
check (
55
62
TopEntryPoint :: MacroStmts ,
56
63
"#!/usr/bin/rust" ,
@@ -94,6 +101,13 @@ fn macro_stmt() {
94
101
95
102
#[ test]
96
103
fn macro_items ( ) {
104
+ check (
105
+ TopEntryPoint :: MacroItems ,
106
+ "" ,
107
+ expect ! [ [ r#"
108
+ MACRO_ITEMS
109
+ "# ] ] ,
110
+ ) ;
97
111
check (
98
112
TopEntryPoint :: MacroItems ,
99
113
"#!/usr/bin/rust" ,
@@ -131,6 +145,14 @@ fn macro_items() {
131
145
132
146
#[ test]
133
147
fn macro_pattern ( ) {
148
+ check (
149
+ TopEntryPoint :: Pattern ,
150
+ "" ,
151
+ expect ! [ [ r#"
152
+ ERROR
153
+ error 0: expected pattern
154
+ "# ] ] ,
155
+ ) ;
134
156
check (
135
157
TopEntryPoint :: Pattern ,
136
158
"Some(_)" ,
@@ -177,6 +199,15 @@ fn macro_pattern() {
177
199
178
200
#[ test]
179
201
fn type_ ( ) {
202
+ check (
203
+ TopEntryPoint :: Type ,
204
+ "" ,
205
+ expect ! [ [ r#"
206
+ ERROR
207
+ error 0: expected type
208
+ "# ] ] ,
209
+ ) ;
210
+
180
211
check (
181
212
TopEntryPoint :: Type ,
182
213
"Option<!>" ,
@@ -226,6 +257,14 @@ fn type_() {
226
257
227
258
#[ test]
228
259
fn expr ( ) {
260
+ check (
261
+ TopEntryPoint :: Expr ,
262
+ "" ,
263
+ expect ! [ [ r#"
264
+ ERROR
265
+ error 0: expected expression
266
+ "# ] ] ,
267
+ ) ;
229
268
check (
230
269
TopEntryPoint :: Expr ,
231
270
"2 + 2 == 5" ,
You can’t perform that action at this time.
0 commit comments