Fix test for invalid blank input

This commit is contained in:
Max Brunsfeld 2016-06-23 09:24:26 -07:00
parent c6e9b32d3f
commit 09b019c530
2 changed files with 5 additions and 14 deletions

View file

@ -100,13 +100,15 @@ describe("Document", [&]() {
ts_document_set_input_string(doc, "");
ts_document_parse(doc);
TSNode new_root = ts_document_root_node(doc);
AssertThat(ts_node_end_char(new_root), Equals<size_t>(0));
assert_node_string_equals(
new_root,
"(ERROR (UNEXPECTED <EOF>))");
"(ERROR)");
ts_document_set_input_string(doc, "1");
ts_document_parse(doc);
new_root = ts_document_root_node(doc);
AssertThat(ts_node_end_char(new_root), Equals<size_t>(1));
assert_node_string_equals(
new_root,
"(number)");