From 12e3b4c70b5ef23b2fdfc197296d483680e125f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 8 Feb 2019 14:49:43 +0300 Subject: reformat the world --- crates/ra_syntax/tests/test.rs | 59 ++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) (limited to 'crates/ra_syntax/tests') diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs index 3243b27ae..168d0623d 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/tests/test.rs @@ -23,36 +23,28 @@ fn lexer_tests() { #[test] fn parser_tests() { - dir_tests( - &test_data_dir(), - &["parser/inline/ok", "parser/ok"], - |text, path| { - let file = SourceFile::parse(text); - let errors = file.errors(); - assert_eq!( - &*errors, - &[] as &[ra_syntax::SyntaxError], - "There should be no errors in the file {:?}", - path.display() - ); - dump_tree(file.syntax()) - }, - ); - dir_tests( - &test_data_dir(), - &["parser/err", "parser/inline/err"], - |text, path| { - let file = SourceFile::parse(text); - let errors = file.errors(); - assert_ne!( - &*errors, - &[] as &[ra_syntax::SyntaxError], - "There should be errors in the file {:?}", - path.display() - ); - dump_tree(file.syntax()) - }, - ); + dir_tests(&test_data_dir(), &["parser/inline/ok", "parser/ok"], |text, path| { + let file = SourceFile::parse(text); + let errors = file.errors(); + assert_eq!( + &*errors, + &[] as &[ra_syntax::SyntaxError], + "There should be no errors in the file {:?}", + path.display() + ); + dump_tree(file.syntax()) + }); + dir_tests(&test_data_dir(), &["parser/err", "parser/inline/err"], |text, path| { + let file = SourceFile::parse(text); + let errors = file.errors(); + assert_ne!( + &*errors, + &[] as &[ra_syntax::SyntaxError], + "There should be errors in the file {:?}", + path.display() + ); + dump_tree(file.syntax()) + }); } #[test] @@ -87,12 +79,7 @@ fn self_hosting_parsing() { 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 - ); + assert_eq!(&*errors, &[], "There should be no errors in the file {:?}", entry); } assert!( count > 30, -- cgit v1.2.3