rust/tests/parser.rs

16 lines
394 B
Rust
Raw Normal View History

2017-12-31 14:27:36 -06:00
extern crate libsyntax2;
2018-01-07 05:56:08 -06:00
extern crate testutils;
2017-12-31 14:27:36 -06:00
2018-07-29 06:37:48 -05:00
use libsyntax2::{tokenize, parse_green};
use libsyntax2::utils::{dump_tree_green};
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-02-03 13:34:35 -06:00
dir_tests(&["parser/inline", "parser/ok", "parser/err"], |text| {
2018-01-27 17:31:23 -06:00
let tokens = tokenize(text);
2018-07-29 05:51:55 -05:00
let file = parse_green(text.to_string(), &tokens);
dump_tree_green(&file)
2018-01-27 17:31:23 -06:00
})
2017-12-31 14:27:36 -06:00
}