mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
19 lines
408 B
Rust
19 lines
408 B
Rust
extern crate file;
|
|
extern crate libsyntax2;
|
|
extern crate testutils;
|
|
|
|
use libsyntax2::{tokenize, parse};
|
|
use libsyntax2::utils::dump_tree;
|
|
use testutils::dir_tests;
|
|
|
|
#[test]
|
|
fn parser_tests() {
|
|
dir_tests(
|
|
&["parser/ok", "parser/err"],
|
|
|text| {
|
|
let tokens = tokenize(text);
|
|
let file = parse(text.to_string(), &tokens);
|
|
dump_tree(&file)
|
|
}
|
|
)
|
|
}
|