aboutsummaryrefslogtreecommitdiff
path: root/tests/parser.rs
blob: 370b02c741833f7a34ca6a24e99eb772e36af4e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
        }
    )
}