diff options
Diffstat (limited to 'crates/ra_syntax/tests/test.rs')
-rw-r--r-- | crates/ra_syntax/tests/test.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs index 4b711f271..f31e12588 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/tests/test.rs | |||
@@ -21,7 +21,7 @@ fn lexer_tests() { | |||
21 | #[test] | 21 | #[test] |
22 | fn parser_tests() { | 22 | fn parser_tests() { |
23 | dir_tests(&test_data_dir(), &["parser/inline/ok", "parser/ok"], |text, path| { | 23 | dir_tests(&test_data_dir(), &["parser/inline/ok", "parser/ok"], |text, path| { |
24 | let parse = SourceFile::parse2(text); | 24 | let parse = SourceFile::parse(text); |
25 | let errors = parse.errors.as_slice(); | 25 | let errors = parse.errors.as_slice(); |
26 | assert_eq!( | 26 | assert_eq!( |
27 | errors, | 27 | errors, |
@@ -32,7 +32,7 @@ fn parser_tests() { | |||
32 | parse.debug_dump() | 32 | parse.debug_dump() |
33 | }); | 33 | }); |
34 | dir_tests(&test_data_dir(), &["parser/err", "parser/inline/err"], |text, path| { | 34 | dir_tests(&test_data_dir(), &["parser/err", "parser/inline/err"], |text, path| { |
35 | let parse = SourceFile::parse2(text); | 35 | let parse = SourceFile::parse(text); |
36 | let errors = parse.errors.as_slice(); | 36 | let errors = parse.errors.as_slice(); |
37 | assert!(!errors.is_empty(), "There should be errors in the file {:?}", path.display()); | 37 | assert!(!errors.is_empty(), "There should be errors in the file {:?}", path.display()); |
38 | parse.debug_dump() | 38 | parse.debug_dump() |
@@ -78,9 +78,7 @@ fn self_hosting_parsing() { | |||
78 | { | 78 | { |
79 | count += 1; | 79 | count += 1; |
80 | let text = read_text(entry.path()); | 80 | let text = read_text(entry.path()); |
81 | let node = SourceFile::parse(&text); | 81 | SourceFile::parse(&text).ok().expect("There should be no errors in the file"); |
82 | let errors = node.errors(); | ||
83 | assert_eq!(&*errors, &[], "There should be no errors in the file {:?}", entry); | ||
84 | } | 82 | } |
85 | assert!( | 83 | assert!( |
86 | count > 30, | 84 | count > 30, |