diff --git a/tests/graphics/boundingbox.cpp b/tests/graphics/boundingbox.cpp index 5d3e1cba1e..a3c1a7ec0b 100644 --- a/tests/graphics/boundingbox.cpp +++ b/tests/graphics/boundingbox.cpp @@ -100,7 +100,10 @@ private: CPPUNIT_TEST( DrawPolygon ); CPPUNIT_TEST( DrawPolyPolygon ); CPPUNIT_TEST( DrawRectangle ); + CPPUNIT_TEST( DrawTwoRectangles ); + CPPUNIT_TEST( DrawRectsOnTransformedDC ); CPPUNIT_TEST( DrawRoundedRectangle ); + CPPUNIT_TEST( DrawRectangleAndReset ); CPPUNIT_TEST( DrawEllipse ); CPPUNIT_TEST( Blit ); CPPUNIT_TEST( StretchBlit ); @@ -125,7 +128,10 @@ private: void DrawPolygon(); void DrawPolyPolygon(); void DrawRectangle(); + void DrawTwoRectangles(); + void DrawRectsOnTransformedDC(); void DrawRoundedRectangle(); + void DrawRectangleAndReset(); void DrawEllipse(); void Blit(); void StretchBlit(); @@ -332,3 +338,26 @@ void GCDCBoundingBoxTestCase::DrawCheckMark() m_gcdc->DrawCheckMark(32, 24, 16, 16); AssertBox(32, 24, 16, 16); } + +void GCDCBoundingBoxTestCase::DrawRectangleAndReset() +{ + m_gcdc->DrawRectangle(2, 2, 12, 12); + m_gcdc->ResetBoundingBox(); + AssertBox(0, 0, 0, 0); +} + +void GCDCBoundingBoxTestCase::DrawTwoRectangles() +{ + m_gcdc->DrawRectangle(10, 15, 50, 30); + m_gcdc->DrawRectangle(15, 20, 55, 35); + AssertBox(10, 15, 60, 40); +} + +void GCDCBoundingBoxTestCase::DrawRectsOnTransformedDC() +{ + m_gcdc->DrawRectangle(10, 15, 50, 30); + m_gcdc->SetDeviceOrigin(15, 20); + m_gcdc->DrawRectangle(15, 20, 45, 35); + m_gcdc->SetDeviceOrigin(5, 10); + AssertBox(5, 5, 65, 60); +}