Unnamed repository; edit this file 'description' to name the repository.
add empty input tests
| -rw-r--r-- | crates/parser/src/tests/top_entries.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/crates/parser/src/tests/top_entries.rs b/crates/parser/src/tests/top_entries.rs index 0ba22cf241..24e41b46f8 100644 --- a/crates/parser/src/tests/top_entries.rs +++ b/crates/parser/src/tests/top_entries.rs @@ -53,6 +53,13 @@ fn source_file() { fn macro_stmt() { check( TopEntryPoint::MacroStmts, + "", + expect![[r#" + MACRO_STMTS + "#]], + ); + check( + TopEntryPoint::MacroStmts, "#!/usr/bin/rust", expect![[r##" MACRO_STMTS @@ -96,6 +103,13 @@ fn macro_stmt() { fn macro_items() { check( TopEntryPoint::MacroItems, + "", + expect![[r#" + MACRO_ITEMS + "#]], + ); + check( + TopEntryPoint::MacroItems, "#!/usr/bin/rust", expect![[r##" MACRO_ITEMS @@ -133,6 +147,14 @@ fn macro_items() { fn macro_pattern() { check( TopEntryPoint::Pattern, + "", + expect![[r#" + ERROR + error 0: expected pattern + "#]], + ); + check( + TopEntryPoint::Pattern, "Some(_)", expect![[r#" TUPLE_STRUCT_PAT @@ -179,6 +201,15 @@ fn macro_pattern() { fn type_() { check( TopEntryPoint::Type, + "", + expect![[r#" + ERROR + error 0: expected type + "#]], + ); + + check( + TopEntryPoint::Type, "Option<!>", expect![[r#" PATH_TYPE @@ -228,6 +259,14 @@ fn type_() { fn expr() { check( TopEntryPoint::Expr, + "", + expect![[r#" + ERROR + error 0: expected expression + "#]], + ); + check( + TopEntryPoint::Expr, "2 + 2 == 5", expect![[r#" BIN_EXPR |