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.rs36
1 files changed, 0 insertions, 36 deletions
diff --git a/crates/syntax/src/tests.rs b/crates/syntax/src/tests.rs
index 58c4b5b8fc..0611143e2a 100644
--- a/crates/syntax/src/tests.rs
+++ b/crates/syntax/src/tests.rs
@@ -60,24 +60,6 @@ fn validation_tests() {
}
#[test]
-fn path_parser_tests() {
- fragment_parser_dir_test(
- &["parser/fragments/path/ok"],
- &["parser/fragments/path/err"],
- crate::ast::Path::parse,
- );
-}
-
-#[test]
-fn pattern_parser_tests() {
- fragment_parser_dir_test(
- &["parser/fragments/pattern/ok"],
- &["parser/fragments/pattern/err"],
- crate::ast::Pat::parse,
- );
-}
-
-#[test]
fn parser_fuzz_tests() {
for (_, text) in collect_rust_files(&test_data_dir(), &["parser/fuzz-failures"]) {
fuzz::check_parser(&text)
@@ -136,24 +118,6 @@ fn assert_errors_are_present(errors: &[SyntaxError], path: &Path) {
assert!(!errors.is_empty(), "There should be errors in the file {:?}", path.display());
}
-fn fragment_parser_dir_test<T, F>(ok_paths: &[&str], err_paths: &[&str], f: F)
-where
- T: crate::AstNode,
- F: Fn(&str) -> Result<T, ()>,
-{
- dir_tests(&test_data_dir(), ok_paths, "rast", |text, path| match f(text) {
- Ok(node) => format!("{:#?}", crate::ast::AstNode::syntax(&node)),
- Err(_) => panic!("Failed to parse '{:?}'", path),
- });
- dir_tests(&test_data_dir(), err_paths, "rast", |text, path| {
- if f(text).is_ok() {
- panic!("'{:?}' successfully parsed when it should have errored", path);
- } else {
- "ERROR\n".to_owned()
- }
- });
-}
-
/// Calls callback `f` with input code and file paths for each `.rs` file in `test_data_dir`
/// subdirectories defined by `paths`.
///