aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/lib.rs
diff options
context:
space:
mode:
authorpcpthm <[email protected]>2019-03-21 17:05:12 +0000
committerpcpthm <[email protected]>2019-03-21 23:04:48 +0000
commite734190c24d2a5aca5b62c2b1ab7e6136017a25c (patch)
tree106ca91f918767cdee896d879ece4930410b6ea7 /crates/ra_syntax/src/lib.rs
parent51323a852a8979a71c21725b3b2771224132b85f (diff)
Refactor parser fuzz testing
Diffstat (limited to 'crates/ra_syntax/src/lib.rs')
-rw-r--r--crates/ra_syntax/src/lib.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index 7334d53ef..4f3020440 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -29,6 +29,8 @@ mod ptr;
29 29
30pub mod algo; 30pub mod algo;
31pub mod ast; 31pub mod ast;
32#[doc(hidden)]
33pub mod fuzz;
32 34
33pub use rowan::{SmolStr, TextRange, TextUnit}; 35pub use rowan::{SmolStr, TextRange, TextUnit};
34pub use ra_parser::SyntaxKind; 36pub use ra_parser::SyntaxKind;
@@ -83,13 +85,6 @@ impl SourceFile {
83 } 85 }
84} 86}
85 87
86pub fn check_fuzz_invariants(text: &str) {
87 let file = SourceFile::parse(text);
88 let root = file.syntax();
89 validation::validate_block_structure(root);
90 let _ = file.errors();
91}
92
93/// This test does not assert anything and instead just shows off the crate's 88/// This test does not assert anything and instead just shows off the crate's
94/// API. 89/// API.
95#[test] 90#[test]