aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r--crates/ra_syntax/tests/data/reparse/fuzz-failures/0000.rs6
-rw-r--r--crates/ra_syntax/tests/data/reparse/fuzz-failures/0001.rs4
-rw-r--r--crates/ra_syntax/tests/data/reparse/fuzz-failures/0002.rs4
-rw-r--r--crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rsbin0 -> 8 bytes
-rw-r--r--crates/ra_syntax/tests/data/reparse/fuzz-failures/0004.rs4
-rw-r--r--crates/ra_syntax/tests/data/reparse/fuzz-failures/0005.rs7
-rw-r--r--crates/ra_syntax/tests/test.rs13
7 files changed, 36 insertions, 2 deletions
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0000.rs b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0000.rs
new file mode 100644
index 000000000..388eb74ed
--- /dev/null
+++ b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0000.rs
@@ -0,0 +1,6 @@
10
21
3
4
5
60 \ No newline at end of file
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0001.rs b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0001.rs
new file mode 100644
index 000000000..d2d42c6f9
--- /dev/null
+++ b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0001.rs
@@ -0,0 +1,4 @@
10
21
3
4bb" \ No newline at end of file
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0002.rs b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0002.rs
new file mode 100644
index 000000000..3fbee1548
--- /dev/null
+++ b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0002.rs
@@ -0,0 +1,4 @@
11
21
3
4""! \ No newline at end of file
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs
new file mode 100644
index 000000000..d2757cd08
--- /dev/null
+++ b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs
Binary files differ
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0004.rs b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0004.rs
new file mode 100644
index 000000000..481617a70
--- /dev/null
+++ b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0004.rs
@@ -0,0 +1,4 @@
10
20
3}
4{; \ No newline at end of file
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0005.rs b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0005.rs
new file mode 100644
index 000000000..074d761c7
--- /dev/null
+++ b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0005.rs
@@ -0,0 +1,7 @@
105
21
3
4
5
6b'
7 \ No newline at end of file
diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs
index 458740c13..537b01368 100644
--- a/crates/ra_syntax/tests/test.rs
+++ b/crates/ra_syntax/tests/test.rs
@@ -8,7 +8,7 @@ use std::{
8}; 8};
9 9
10use test_utils::{project_dir, dir_tests, read_text, collect_tests}; 10use test_utils::{project_dir, dir_tests, read_text, collect_tests};
11use ra_syntax::{SourceFile, AstNode, check_fuzz_invariants}; 11use ra_syntax::{SourceFile, AstNode, fuzz};
12 12
13#[test] 13#[test]
14fn lexer_tests() { 14fn lexer_tests() {
@@ -47,7 +47,16 @@ fn parser_tests() {
47#[test] 47#[test]
48fn parser_fuzz_tests() { 48fn parser_fuzz_tests() {
49 for (_, text) in collect_tests(&test_data_dir(), &["parser/fuzz-failures"]) { 49 for (_, text) in collect_tests(&test_data_dir(), &["parser/fuzz-failures"]) {
50 check_fuzz_invariants(&text) 50 fuzz::check_parser(&text)
51 }
52}
53
54#[test]
55fn 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();
51 } 60 }
52} 61}
53 62