rust-analyzer/tests/parser.rs
2018-02-03 22:34:35 +03:00

15 lines
368 B
Rust

extern crate libsyntax2;
extern crate testutils;
use libsyntax2::{parse, tokenize};
use libsyntax2::utils::dump_tree;
use testutils::dir_tests;
#[test]
fn parser_tests() {
dir_tests(&["parser/inline", "parser/ok", "parser/err"], |text| {
let tokens = tokenize(text);
let file = parse(text.to_string(), &tokens);
dump_tree(&file)
})
}