diff options
author | Neil <nyamatongwe@gmail.com> | 2021-08-25 08:21:33 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-08-25 08:21:33 +1000 |
commit | bb75e40bca7a6d81eb4070a7b67950119dc4b8b5 (patch) | |
tree | c90d62fb94bbc96736a8027a0e02dd784826eb59 /test/unit/testContractionState.cxx | |
parent | dc0398d650e75efe9641f0c48d630f2c2027281a (diff) | |
download | scintilla-mirror-bb75e40bca7a6d81eb4070a7b67950119dc4b8b5.tar.gz |
Allow SCI_HIDELINES to hide the first line or all lines.
Diffstat (limited to 'test/unit/testContractionState.cxx')
-rw-r--r-- | test/unit/testContractionState.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/testContractionState.cxx b/test/unit/testContractionState.cxx index 64f300a87..30d5454f9 100644 --- a/test/unit/testContractionState.cxx +++ b/test/unit/testContractionState.cxx @@ -107,6 +107,7 @@ TEST_CASE("ContractionState") { REQUIRE(true == pcs->GetVisible(0)); REQUIRE(false == pcs->GetVisible(1)); REQUIRE(true == pcs->HiddenLines()); + REQUIRE(1 == pcs->LinesDisplayed()); pcs->SetVisible(1, 1, true); for (int l=0;l<2;l++) { @@ -115,6 +116,20 @@ TEST_CASE("ContractionState") { REQUIRE(false == pcs->HiddenLines()); } + SECTION("Hide All") { + pcs->InsertLines(0,1); + for (int l=0;l<2;l++) { + REQUIRE(true == pcs->GetVisible(0)); + } + REQUIRE(false == pcs->HiddenLines()); + + pcs->SetVisible(0, 1, false); + REQUIRE(false == pcs->GetVisible(0)); + REQUIRE(false == pcs->GetVisible(1)); + REQUIRE(true == pcs->HiddenLines()); + REQUIRE(0 == pcs->LinesDisplayed()); + } + SECTION("Contracting") { pcs->InsertLines(0,4); for (int l=0;l<4;l++) { |