aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-28 15:34:28 +0100
committerAleksey Kladov <[email protected]>2019-05-28 15:34:28 +0100
commit0efbcdf43544af471a935c790ae99e2a9b5516c3 (patch)
tree4d9d65e4888cacf5fd7fbc359233afb8fe5395ad /crates/ra_syntax/tests
parent310bfe57bd1ea3cd5e22d434ae9d709265af5463 (diff)
remove old parsing methods
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r--crates/ra_syntax/tests/test.rs8
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]
22fn parser_tests() { 22fn 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,