X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1bfb73b87798f925c4cf1798b0bdceaced4ec6a6..8bb0880114088f0f72411d4e26e1a77208ece4ae:/tests/geometry/rect.cpp diff --git a/tests/geometry/rect.cpp b/tests/geometry/rect.cpp index cb196373ce..e22c41e61b 100644 --- a/tests/geometry/rect.cpp +++ b/tests/geometry/rect.cpp @@ -129,6 +129,14 @@ void RectTestCase::Operators() ( data.GetSecond() + data.GetFirst() ) == data.GetResult() ); } + + // test operator*() which returns the intersection of two rectangles + wxRect r1 = wxRect(0, 2, 3, 4); + wxRect r2 = wxRect(1, 2, 7, 8); + r1 *= r2; + CPPUNIT_ASSERT(wxRect(1, 2, 2, 4) == r1); + + CPPUNIT_ASSERT( (r1 * wxRect()).IsEmpty() ); } void RectTestCase::Union()