mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 20:23:59 +00:00
add empty input tests
This commit is contained in:
parent
c72908a201
commit
2e34a5e2e9
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user