]> git.saurik.com Git - wxWidgets.git/commitdiff
Really fix the use of deprecated methods in wxGrid test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Dec 2011 18:30:52 +0000 (18:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Dec 2011 18:30:52 +0000 (18:30 +0000)
The changes of r70111 were wrong, the unit test for wxGrid really did intend
to test the deprecated methods so restore them -- but only in
WXWIN_COMPATIBILITY_2_8 case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/controls/gridtest.cpp

index 0bb469ab37894c130dd46751b49a9e564f9578ca..6bde424215f0a8d9c395eb8751c6c2fe1073ae6f 100644 (file)
@@ -644,11 +644,13 @@ void GridTestCase::CellFormatting()
 
     CPPUNIT_ASSERT_EQUAL(back, m_grid->GetCellTextColour(0, 0));
 
-    m_grid->SetCellAlignment(0, 0, wxALIGN_CENTRE);
+#if WXWIN_COMPATIBILITY_2_8
+    m_grid->SetCellAlignment(wxALIGN_CENTRE, 0, 0);
     m_grid->GetCellAlignment(0, 0, &cellhoriz, &cellvert);
 
     CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_CENTRE), cellhoriz);
     CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_CENTRE), cellvert);
+#endif // WXWIN_COMPATIBILITY_2_8
 
     m_grid->SetCellAlignment(0, 0, wxALIGN_LEFT, wxALIGN_BOTTOM);
     m_grid->GetCellAlignment(0, 0, &cellhoriz, &cellvert);
@@ -656,12 +658,12 @@ void GridTestCase::CellFormatting()
     CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_LEFT), cellhoriz);
     CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_BOTTOM), cellvert);
 
-    m_grid->SetCellTextColour(0, 0, *wxRED);
-
+#if WXWIN_COMPATIBILITY_2_8
+    m_grid->SetCellTextColour(*wxRED, 0, 0);
     CPPUNIT_ASSERT_EQUAL(*wxRED, m_grid->GetCellTextColour(0, 0));
+#endif // WXWIN_COMPATIBILITY_2_8
 
     m_grid->SetCellTextColour(0, 0, *wxGREEN);
-
     CPPUNIT_ASSERT_EQUAL(*wxGREEN, m_grid->GetCellTextColour(0, 0));
 }