2017-12-31 14:27:36 -06:00
|
|
|
extern crate file;
|
|
|
|
extern crate libsyntax2;
|
2018-01-07 05:56:08 -06:00
|
|
|
extern crate testutils;
|
2017-12-31 14:27:36 -06:00
|
|
|
|
2018-01-27 17:31:23 -06:00
|
|
|
use libsyntax2::{parse, tokenize};
|
2018-01-21 17:12:26 -06:00
|
|
|
use libsyntax2::utils::dump_tree;
|
2018-01-07 06:34:11 -06:00
|
|
|
use testutils::dir_tests;
|
2017-12-31 14:27:36 -06:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn parser_tests() {
|
2018-01-27 17:31:23 -06:00
|
|
|
dir_tests(&["parser/ok", "parser/err"], |text| {
|
|
|
|
let tokens = tokenize(text);
|
|
|
|
let file = parse(text.to_string(), &tokens);
|
|
|
|
dump_tree(&file)
|
|
|
|
})
|
2017-12-31 14:27:36 -06:00
|
|
|
}
|