]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/controls/gridtest.cpp
Fix wrong in wxListCtrl::SetItemColumnImage() in r74716.
[wxWidgets.git] / tests / controls / gridtest.cpp
index 3e94e92c4bccce0fb7d73ac59896646a45208dfd..0cc2e931c9b572733507105d04c0f2567360d25c 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxGrid unit test
 // Author:      Steven Lamerton
 // Created:     2010-06-25
-// RCS-ID:      $Id$
 // Copyright:   (c) 2010 Steven Lamerton
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -59,6 +58,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 +87,7 @@ private:
     void Selection();
     void AddRowCol();
     void ColumnOrder();
+    void ColumnVisibility();
     void LineFormatting();
     void SortSupport();
     void Labels();
@@ -151,7 +152,9 @@ void GridTestCase::tearDown()
 
 void GridTestCase::CellEdit()
 {
-#if wxUSE_UIACTIONSIMULATOR
+    // TODO on OSX when running the grid test suite solo this works
+    // but not when running it together with other tests
+#if wxUSE_UIACTIONSIMULATOR && !defined(__WXOSX__)
     EventCounter changing(m_grid, wxEVT_GRID_CELL_CHANGING);
     EventCounter changed(m_grid, wxEVT_GRID_CELL_CHANGED);
     EventCounter created(m_grid, wxEVT_GRID_EDITOR_CREATED);
@@ -330,7 +333,8 @@ void GridTestCase::SortClick()
 
 void GridTestCase::Size()
 {
-#if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__)
+    // TODO on OSX resizing interactively works, but not automated
+#if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__) && !defined(__WXOSX__) 
     EventCounter colsize(m_grid, wxEVT_GRID_COL_SIZE);
     EventCounter rowsize(m_grid, wxEVT_GRID_ROW_SIZE);
 
@@ -526,6 +530,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());