diff --git a/crates/parser/src/tests/top_entries.rs b/crates/parser/src/tests/top_entries.rs index 0ba22cf2411..24e41b46f8e 100644 --- a/crates/parser/src/tests/top_entries.rs +++ b/crates/parser/src/tests/top_entries.rs @@ -51,6 +51,13 @@ fn source_file() { #[test] fn macro_stmt() { + check( + TopEntryPoint::MacroStmts, + "", + expect![[r#" + MACRO_STMTS + "#]], + ); check( TopEntryPoint::MacroStmts, "#!/usr/bin/rust", @@ -94,6 +101,13 @@ fn macro_stmt() { #[test] fn macro_items() { + check( + TopEntryPoint::MacroItems, + "", + expect![[r#" + MACRO_ITEMS + "#]], + ); check( TopEntryPoint::MacroItems, "#!/usr/bin/rust", @@ -131,6 +145,14 @@ fn macro_items() { #[test] fn macro_pattern() { + check( + TopEntryPoint::Pattern, + "", + expect![[r#" + ERROR + error 0: expected pattern + "#]], + ); check( TopEntryPoint::Pattern, "Some(_)", @@ -177,6 +199,15 @@ fn macro_pattern() { #[test] fn type_() { + check( + TopEntryPoint::Type, + "", + expect![[r#" + ERROR + error 0: expected type + "#]], + ); + check( TopEntryPoint::Type, "Option", @@ -226,6 +257,14 @@ fn type_() { #[test] fn expr() { + check( + TopEntryPoint::Expr, + "", + expect![[r#" + ERROR + error 0: expected expression + "#]], + ); check( TopEntryPoint::Expr, "2 + 2 == 5",