X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/784130d2908698da90cefdbe3ddbf241b9c06c84..a9fd42ccebb2534cfd3910bc7108171f4ee6d54b:/tests/controls/gridtest.cpp?ds=sidebyside diff --git a/tests/controls/gridtest.cpp b/tests/controls/gridtest.cpp index 3e94e92c4b..8012b51429 100644 --- a/tests/controls/gridtest.cpp +++ b/tests/controls/gridtest.cpp @@ -59,6 +59,7 @@ private: CPPUNIT_TEST( Selection ); CPPUNIT_TEST( AddRowCol ); CPPUNIT_TEST( ColumnOrder ); + CPPUNIT_TEST( ColumnVisibility ); CPPUNIT_TEST( LineFormatting ); CPPUNIT_TEST( SortSupport ); CPPUNIT_TEST( Labels ); @@ -87,6 +88,7 @@ private: void Selection(); void AddRowCol(); void ColumnOrder(); + void ColumnVisibility(); void LineFormatting(); void SortSupport(); void Labels(); @@ -526,6 +528,19 @@ void GridTestCase::ColumnOrder() CPPUNIT_ASSERT_EQUAL(3, m_grid->GetColPos(3)); } +void GridTestCase::ColumnVisibility() +{ + m_grid->AppendCols(3); + CPPUNIT_ASSERT( m_grid->IsColShown(1) ); + + m_grid->HideCol(1); + CPPUNIT_ASSERT( !m_grid->IsColShown(1) ); + CPPUNIT_ASSERT( m_grid->IsColShown(2) ); + + m_grid->ShowCol(1); + CPPUNIT_ASSERT( m_grid->IsColShown(1) ); +} + void GridTestCase::LineFormatting() { CPPUNIT_ASSERT(m_grid->GridLinesEnabled());