diff options
| author | nyamatongwe <unknown> | 2011-06-07 11:48:54 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-06-07 11:48:54 +1000 | 
| commit | 7c30a49a688384e5b2c0c573b3ec7ce400c01f7b (patch) | |
| tree | f8067474c06b4a259e5c2a85eca2808bf9df39b1 /test/unit/testContractionState.cxx | |
| parent | d46eab36df50e53cbe423ac5bf938d4c291bf5d2 (diff) | |
| download | scintilla-mirror-7c30a49a688384e5b2c0c573b3ec7ce400c01f7b.tar.gz | |
Add tests for bug found in #3291579 and for new RunStyles::Find
and ContractionState::HiddenLines methods.
Diffstat (limited to 'test/unit/testContractionState.cxx')
| -rw-r--r-- | test/unit/testContractionState.cxx | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/test/unit/testContractionState.cxx b/test/unit/testContractionState.cxx index 96a7bbf8a..bd3b6f111 100644 --- a/test/unit/testContractionState.cxx +++ b/test/unit/testContractionState.cxx @@ -76,6 +76,7 @@ TEST_F(ContractionStateTest, ShowHide) {  	EXPECT_EQ(0, pcs->GetVisible(1));  	EXPECT_EQ(true, pcs->GetVisible(2));  	EXPECT_EQ(4, pcs->LinesDisplayed()); +	EXPECT_EQ(1, pcs->HiddenLines());  	pcs->SetVisible(1, 2, true);  	for (int l=0;l<4;l++) { @@ -88,6 +89,26 @@ TEST_F(ContractionStateTest, ShowHide) {  	for (int l=0;l<4;l++) {  		EXPECT_EQ(true, pcs->GetVisible(0));  	} +	EXPECT_EQ(0, pcs->HiddenLines()); +} + +TEST_F(ContractionStateTest, Hidden) { +	pcs->InsertLines(0,1); +	for (int l=0;l<2;l++) { +		EXPECT_EQ(true, pcs->GetVisible(0)); +	} +	EXPECT_EQ(0, pcs->HiddenLines()); + +	pcs->SetVisible(1, 1, false); +	EXPECT_EQ(true, pcs->GetVisible(0)); +	EXPECT_EQ(0, pcs->GetVisible(1)); +	EXPECT_EQ(1, pcs->HiddenLines()); + +	pcs->SetVisible(1, 1, true); +	for (int l=0;l<2;l++) { +		EXPECT_EQ(true, pcs->GetVisible(0)); +	} +	EXPECT_EQ(0, pcs->HiddenLines());  }  TEST_F(ContractionStateTest, Contracting) { | 
