From 9bf97bd607505b854ab2cefdda2ce901d89af7e3 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Wed, 29 Jun 2016 20:54:02 +0200 Subject: [PATCH] Use wxMemoryDC with selected wxBitmap to create wxGraphicsContext in the graphics test. If there is no wxBitmap selected into wxMemoryDC which is passed to wxGraphicsContext then there is raised an assertion warning (harmless in this context but caught and reported by CppUnit). To suppress this message we need to select any bitmap into wxMemoryDC prior to creating a wxGraphicsContext. --- tests/graphics/affinematrix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/graphics/affinematrix.cpp b/tests/graphics/affinematrix.cpp index 8c2717ea2a..f7a16d0793 100644 --- a/tests/graphics/affinematrix.cpp +++ b/tests/graphics/affinematrix.cpp @@ -193,7 +193,8 @@ void AffineTransformTestCase::CompareToGraphicsContext() // Create graphics matrix and transform it - wxMemoryDC mDc; + wxBitmap bmp(10, 10); + wxMemoryDC mDc(bmp); wxGraphicsContext* gDc = wxGraphicsContext::Create(mDc); wxGraphicsMatrix matrixG1 = gDc->CreateMatrix(); wxGraphicsMatrix matrixG2 = gDc->CreateMatrix();