Fix get_changed_ranges tests

Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
This commit is contained in:
Max Brunsfeld 2018-07-17 15:18:46 -07:00
parent 8b772df3ff
commit 999ef4fd12

View file

@ -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.