]> git.saurik.com Git - wxWidgets.git/commitdiff
Add wxUSE_DC_TRANSFORM_MATRIX checks to the unit test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Apr 2011 18:43:58 +0000 (18:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Apr 2011 18:43:58 +0000 (18:43 +0000)
Allow the unit test to compile even when wxUSE_DC_TRANSFORM_MATRIX is 0.

See #13092.

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

tests/graphics/affinematrix.cpp

index ffa4f58d283d6f919af4a4c8607483682bbbd29f..0e544663f11840b87555d11e0fb750763e0e0c4a 100644 (file)
@@ -39,16 +39,20 @@ public:
 private:
     CPPUNIT_TEST_SUITE( AffineTransformTestCase );
         CPPUNIT_TEST( InvertMatrix );
+#if wxUSE_DC_TRANSFORM_MATRIX
         CPPUNIT_TEST( VMirrorAndTranslate );
         CPPUNIT_TEST( Rotate90Clockwise );
+#endif // wxUSE_DC_TRANSFORM_MATRIX
     CPPUNIT_TEST_SUITE_END();
 
     void InvertMatrix();
+#if wxUSE_DC_TRANSFORM_MATRIX
     void VMirrorAndTranslate();
     void Rotate90Clockwise();
 
     wxImage m_imgOrig;
     wxBitmap m_bmpOrig;
+#endif // wxUSE_DC_TRANSFORM_MATRIX
 
     DECLARE_NO_COPY_CLASS(AffineTransformTestCase)
 };
@@ -61,11 +65,13 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( AffineTransformTestCase, "AffineTransform
 
 void AffineTransformTestCase::setUp()
 {
+#if wxUSE_DC_TRANSFORM_MATRIX
     m_imgOrig.LoadFile("horse.jpg");
 
     CPPUNIT_ASSERT( m_imgOrig.IsOk() );
 
     m_bmpOrig = wxBitmap(m_imgOrig);
+#endif // wxUSE_DC_TRANSFORM_MATRIX
 }
 
 void AffineTransformTestCase::InvertMatrix()
@@ -91,6 +97,8 @@ void AffineTransformTestCase::InvertMatrix()
     CPPUNIT_ASSERT( matrix2.IsIdentity() );
 }
 
+#if wxUSE_DC_TRANSFORM_MATRIX
+
 void AffineTransformTestCase::VMirrorAndTranslate()
 {
     wxBitmap bmpUsingMatrix(m_bmpOrig.GetWidth(), m_bmpOrig.GetHeight());
@@ -138,3 +146,5 @@ void AffineTransformTestCase::Rotate90Clockwise()
 
     CPPUNIT_ASSERT_EQUAL( imgUsingMatrix, imgOrigRotate90Clockwise );
 }
+
+#endif // wxUSE_DC_TRANSFORM_MATRIX