Verify changed ranges for random deletions as well as random insertions
This commit is contained in:
parent
4bad58b407
commit
1412419434
1 changed files with 10 additions and 1 deletions
|
|
@ -163,7 +163,16 @@ describe("The Corpus", []() {
|
|||
|
||||
ts_document_edit(document, input->undo());
|
||||
assert_correct_tree_size(document, input->content);
|
||||
ts_document_parse(document);
|
||||
|
||||
TSRange *ranges;
|
||||
size_t range_count;
|
||||
ScopeSequence old_scope_sequence = build_scope_sequence(document, input->content);
|
||||
ts_document_parse_and_get_changed_ranges(document, &ranges, &range_count);
|
||||
|
||||
ScopeSequence new_scope_sequence = build_scope_sequence(document, input->content);
|
||||
verify_changed_ranges(old_scope_sequence, new_scope_sequence,
|
||||
input->content, ranges, range_count);
|
||||
ts_free(ranges);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue