From 0efbcdf43544af471a935c790ae99e2a9b5516c3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 28 May 2019 17:34:28 +0300 Subject: remove old parsing methods --- crates/ra_syntax/tests/test.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crates/ra_syntax/tests/test.rs') 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() { #[test] fn parser_tests() { dir_tests(&test_data_dir(), &["parser/inline/ok", "parser/ok"], |text, path| { - let parse = SourceFile::parse2(text); + let parse = SourceFile::parse(text); let errors = parse.errors.as_slice(); assert_eq!( errors, @@ -32,7 +32,7 @@ fn parser_tests() { parse.debug_dump() }); dir_tests(&test_data_dir(), &["parser/err", "parser/inline/err"], |text, path| { - let parse = SourceFile::parse2(text); + let parse = SourceFile::parse(text); let errors = parse.errors.as_slice(); assert!(!errors.is_empty(), "There should be errors in the file {:?}", path.display()); parse.debug_dump() @@ -78,9 +78,7 @@ fn self_hosting_parsing() { { count += 1; let text = read_text(entry.path()); - let node = SourceFile::parse(&text); - let errors = node.errors(); - assert_eq!(&*errors, &[], "There should be no errors in the file {:?}", entry); + SourceFile::parse(&text).ok().expect("There should be no errors in the file"); } assert!( count > 30, -- cgit v1.2.3