From 4c7142d0c9be90c8947deb788993d903b2e0a5d1 Mon Sep 17 00:00:00 2001 From: pcpthm Date: Fri, 22 Mar 2019 02:06:48 +0900 Subject: Add fuzz test for reparsing --- crates/ra_syntax/tests/test.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crates/ra_syntax/tests') diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs index 3de4a65af..537b01368 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/tests/test.rs @@ -51,6 +51,15 @@ fn parser_fuzz_tests() { } } +#[test] +fn reparse_fuzz_tests() { + for (_, text) in collect_tests(&test_data_dir(), &["reparse/fuzz-failures"]) { + let check = fuzz::CheckReparse::from_data(text.as_bytes()).unwrap(); + println!("{:?}", check); + check.run(); + } +} + /// Test that Rust-analyzer can parse and validate the rust-analyser /// TODO: Use this as a benchmark #[test] -- cgit v1.2.3