Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/tests.rs')
-rw-r--r--crates/syntax/src/tests.rs26
1 files changed, 3 insertions, 23 deletions
diff --git a/crates/syntax/src/tests.rs b/crates/syntax/src/tests.rs
index 65fcaee9a8..04105dedc9 100644
--- a/crates/syntax/src/tests.rs
+++ b/crates/syntax/src/tests.rs
@@ -1,4 +1,3 @@
-mod sourcegen_tests;
mod sourcegen_ast;
mod ast_src;
@@ -51,24 +50,13 @@ fn benchmark_parser() {
}
#[test]
-fn parser_tests() {
- dir_tests(&test_data_dir(), &["parser/inline/ok"], "rast", |text, path| {
+fn validation_tests() {
+ dir_tests(&test_data_dir(), &["parser/validation"], "rast", |text, path| {
let parse = SourceFile::parse(text);
let errors = parse.errors();
- assert_errors_are_absent(errors, path);
+ assert_errors_are_present(errors, path);
parse.debug_dump()
});
- dir_tests(
- &test_data_dir(),
- &["parser/inline/err", "parser/validation"],
- "rast",
- |text, path| {
- let parse = SourceFile::parse(text);
- let errors = parse.errors();
- assert_errors_are_present(errors, path);
- parse.debug_dump()
- },
- );
}
#[test]
@@ -183,14 +171,6 @@ fn test_data_dir() -> PathBuf {
fn assert_errors_are_present(errors: &[SyntaxError], path: &Path) {
assert!(!errors.is_empty(), "There should be errors in the file {:?}", path.display());
}
-fn assert_errors_are_absent(errors: &[SyntaxError], path: &Path) {
- assert_eq!(
- errors,
- &[] as &[SyntaxError],
- "There should be no errors in the file {:?}",
- path.display(),
- );
-}
fn fragment_parser_dir_test<T, F>(ok_paths: &[&str], err_paths: &[&str], f: F)
where