diff options
| author | nyamatongwe <devnull@localhost> | 2011-06-07 11:48:54 +1000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2011-06-07 11:48:54 +1000 | 
| commit | 83c2fa5a9d49f11920cfa2cb906469a7b82db3c3 (patch) | |
| tree | 0a808fc04db16ffda63b424bcc4d6d06b3e655cd /test/unit/testContractionState.cxx | |
| parent | 991dbfef722926eb5c919d90ab4e1e6a93b5ed51 (diff) | |
| download | scintilla-mirror-83c2fa5a9d49f11920cfa2cb906469a7b82db3c3.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) { | 
