From 999ef4fd127a9631c70fa1b14bd4a9e051848349 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 17 Jul 2018 15:18:46 -0700 Subject: [PATCH] Fix get_changed_ranges tests Co-Authored-By: Ashi Krishnan --- test/runtime/tree_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtime/tree_test.cc b/test/runtime/tree_test.cc index 0993944a..c60f2af6 100644 --- a/test/runtime/tree_test.cc +++ b/test/runtime/tree_test.cc @@ -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({ range_for_substring(input->content, "nothing"), @@ -200,7 +200,7 @@ describe("Tree", [&]() { "(pair (property_identifier) (false)))))" ); AssertThat(ranges, Equals(vector({ - range_for_substring(input->content, ", c: 1, b: false"), + range_for_substring(input->content, ", c: 1"), }))); // Delete the middle pair.