aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/parser/0000_empty.txt2
-rw-r--r--tests/parser.rs9
2 files changed, 2 insertions, 9 deletions
diff --git a/tests/data/parser/0000_empty.txt b/tests/data/parser/0000_empty.txt
index 843ea118d..54be3e7bc 100644
--- a/tests/data/parser/0000_empty.txt
+++ b/tests/data/parser/0000_empty.txt
@@ -1 +1 @@
FILE@[0; 0) \ No newline at end of file FILE@[0; 0)
diff --git a/tests/parser.rs b/tests/parser.rs
index f61b6830b..e71b48852 100644
--- a/tests/parser.rs
+++ b/tests/parser.rs
@@ -7,7 +7,7 @@ use std::path::{PathBuf, Path};
7use std::fs::read_dir; 7use std::fs::read_dir;
8use std::fmt::Write; 8use std::fmt::Write;
9 9
10use libsyntax2::{tokenize, Token, Node, File, FileBuilder}; 10use libsyntax2::{tokenize, parse, Token, Node, File, FileBuilder};
11 11
12#[test] 12#[test]
13fn parser_tests() { 13fn parser_tests() {
@@ -67,10 +67,3 @@ fn dump_tree(file: &File) -> String {
67 } 67 }
68 } 68 }
69} 69}
70
71fn parse(text: String, tokens: &[Token]) -> File {
72 let mut builder = FileBuilder::new(text);
73 builder.start_internal(libsyntax2::syntax_kinds::FILE);
74 builder.finish_internal();
75 builder.finish()
76} \ No newline at end of file