From f6a9859562ddeb04e882e4a3d15adbf64345452a Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 17 Jul 2022 14:09:52 +1000 Subject: Feature [feature-requests:#1441] Line state optimized to avoid excess allocations by always allocating for every line. --- test/unit/testPerLine.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/unit') diff --git a/test/unit/testPerLine.cxx b/test/unit/testPerLine.cxx index 5209c194e..74881f40e 100644 --- a/test/unit/testPerLine.cxx +++ b/test/unit/testPerLine.cxx @@ -226,11 +226,11 @@ TEST_CASE("LineState") { } SECTION("SetLineState") { - REQUIRE(0 == ls.SetLineState(1, 200)); + REQUIRE(0 == ls.SetLineState(1, 200, 2)); REQUIRE(0 == ls.GetLineState(0)); REQUIRE(200 == ls.GetLineState(1)); REQUIRE(0 == ls.GetLineState(2)); - REQUIRE(0 == ls.SetLineState(2, 400)); + REQUIRE(0 == ls.SetLineState(2, 400, 3)); REQUIRE(0 == ls.GetLineState(0)); REQUIRE(200 == ls.GetLineState(1)); REQUIRE(400 == ls.GetLineState(2)); @@ -244,11 +244,11 @@ TEST_CASE("LineState") { SECTION("InsertRemoveLine") { REQUIRE(0 == ls.GetMaxLineState()); - ls.SetLineState(1, 1); - ls.SetLineState(2, 2); - REQUIRE(3 == ls.GetMaxLineState()); - ls.InsertLine(2); + ls.SetLineState(1, 1, 3); + ls.SetLineState(2, 2, 3); REQUIRE(4 == ls.GetMaxLineState()); + ls.InsertLine(2); + REQUIRE(5 == ls.GetMaxLineState()); REQUIRE(0 == ls.GetLineState(0)); REQUIRE(1 == ls.GetLineState(1)); REQUIRE(2 == ls.GetLineState(2)); -- cgit v1.2.3