aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/unit/testContractionState.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-12-01 20:41:27 +1100
committerNeil <nyamatongwe@gmail.com>2019-12-01 20:41:27 +1100
commit2892e0d04bcf02fe249939f7c22fe8c6d780233a (patch)
tree8df27d8568a6a1ef7c07eb77819bd589b298e464 /test/unit/testContractionState.cxx
parent7153448eb8dfe267f96eb55aee683172f15cc283 (diff)
downloadscintilla-mirror-2892e0d04bcf02fe249939f7c22fe8c6d780233a.tar.gz
Backport: Allow setting value at end of a SparseVector.
Change representation of SparseVector in tests so last value can be seen. Backport of changeset 7778:b7842ad8047b.
Diffstat (limited to 'test/unit/testContractionState.cxx')
-rw-r--r--test/unit/testContractionState.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/testContractionState.cxx b/test/unit/testContractionState.cxx
index fcee90287..5fada7645 100644
--- a/test/unit/testContractionState.cxx
+++ b/test/unit/testContractionState.cxx
@@ -147,12 +147,18 @@ TEST_CASE("ContractionState") {
SECTION("SetFoldDisplayText") {
pcs->InsertLines(0, 4);
+ REQUIRE(5 == pcs->LinesInDoc());
pcs->SetFoldDisplayText(1, "abc");
REQUIRE(strcmp(pcs->GetFoldDisplayText(1), "abc") == 0);
pcs->SetFoldDisplayText(1, "def");
REQUIRE(strcmp(pcs->GetFoldDisplayText(1), "def") == 0);
pcs->SetFoldDisplayText(1, nullptr);
REQUIRE(static_cast<const char *>(nullptr) == pcs->GetFoldDisplayText(1));
+ // At end
+ pcs->SetFoldDisplayText(5, "xyz");
+ REQUIRE(strcmp(pcs->GetFoldDisplayText(5), "xyz") == 0);
+ pcs->DeleteLines(4, 1);
+ REQUIRE(strcmp(pcs->GetFoldDisplayText(4), "xyz") == 0);
}
}