diff options
author | pcpthm <[email protected]> | 2019-03-21 17:06:48 +0000 |
---|---|---|
committer | pcpthm <[email protected]> | 2019-03-21 23:04:48 +0000 |
commit | 4c7142d0c9be90c8947deb788993d903b2e0a5d1 (patch) | |
tree | 0fc0ebe4aa7918e39b4e95d23ad192a0734f339a /crates/ra_syntax/tests | |
parent | e734190c24d2a5aca5b62c2b1ab7e6136017a25c (diff) |
Add fuzz test for reparsing
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r-- | crates/ra_syntax/tests/test.rs | 9 |
1 files changed, 9 insertions, 0 deletions
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() { | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | #[test] | ||
55 | fn reparse_fuzz_tests() { | ||
56 | for (_, text) in collect_tests(&test_data_dir(), &["reparse/fuzz-failures"]) { | ||
57 | let check = fuzz::CheckReparse::from_data(text.as_bytes()).unwrap(); | ||
58 | println!("{:?}", check); | ||
59 | check.run(); | ||
60 | } | ||
61 | } | ||
62 | |||
54 | /// Test that Rust-analyzer can parse and validate the rust-analyser | 63 | /// Test that Rust-analyzer can parse and validate the rust-analyser |
55 | /// TODO: Use this as a benchmark | 64 | /// TODO: Use this as a benchmark |
56 | #[test] | 65 | #[test] |