Fix get_changed_ranges tests
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
This commit is contained in:
parent
8b772df3ff
commit
999ef4fd12
1 changed files with 2 additions and 2 deletions
|
|
@ -134,7 +134,7 @@ describe("Tree", [&]() {
|
|||
it("reports changes when one token has been updated", [&]() {
|
||||
// Replace `null` with `nothing`
|
||||
auto ranges = get_changed_ranges_for_edit([&]() {
|
||||
return input->replace(input->content.find("ull"), 1, "othing");
|
||||
return input->replace(input->content.find("ull"), 3, "othing");
|
||||
});
|
||||
AssertThat(ranges, Equals(vector<TSRange>({
|
||||
range_for_substring(input->content, "nothing"),
|
||||
|
|
@ -200,7 +200,7 @@ describe("Tree", [&]() {
|
|||
"(pair (property_identifier) (false)))))"
|
||||
);
|
||||
AssertThat(ranges, Equals(vector<TSRange>({
|
||||
range_for_substring(input->content, ", c: 1, b: false"),
|
||||
range_for_substring(input->content, ", c: 1"),
|
||||
})));
|
||||
|
||||
// Delete the middle pair.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue