diff options
author | Zufu Liu <unknown> | 2022-07-24 10:00:06 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2022-07-24 10:00:06 +1000 |
commit | 2a922d679ec36743287191fbd9f67a6fef9f7f1b (patch) | |
tree | b5743e169339ff691913b9fd0a5d59455db73498 /test | |
parent | 46e54d394dfd76a0d3055850ce8e6f394dfe2ba7 (diff) | |
download | scintilla-mirror-2a922d679ec36743287191fbd9f67a6fef9f7f1b.tar.gz |
Bug [#2340] Simplify expand all folds. Speed up expand line a little.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/testContractionState.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/unit/testContractionState.cxx b/test/unit/testContractionState.cxx index 30d5454f9..0fd391906 100644 --- a/test/unit/testContractionState.cxx +++ b/test/unit/testContractionState.cxx @@ -152,6 +152,28 @@ TEST_CASE("ContractionState") { REQUIRE(true == pcs->GetExpanded(3)); } + SECTION("ExpandAll") { + pcs->InsertLines(0,4); + for (int l=0;l<4;l++) { + REQUIRE(true == pcs->GetExpanded(l)); + } + + pcs->SetExpanded(2, false); + REQUIRE(true == pcs->GetExpanded(1)); + REQUIRE(false == pcs->GetExpanded(2)); + REQUIRE(true == pcs->GetExpanded(3)); + + pcs->SetExpanded(1, false); + REQUIRE(false == pcs->GetExpanded(1)); + REQUIRE(false == pcs->GetExpanded(2)); + REQUIRE(true == pcs->GetExpanded(3)); + + REQUIRE(true == pcs->ExpandAll()); + REQUIRE(true == pcs->GetExpanded(1)); + REQUIRE(true == pcs->GetExpanded(2)); + REQUIRE(true == pcs->GetExpanded(3)); + } + SECTION("ChangeHeight") { pcs->InsertLines(0,4); for (int l=0;l<4;l++) { |