summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qa/cppunit/test_rectangle.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/qa/cppunit/test_rectangle.cxx b/tools/qa/cppunit/test_rectangle.cxx
index e4992f3f44f9..29aa6cde94df 100644
--- a/tools/qa/cppunit/test_rectangle.cxx
+++ b/tools/qa/cppunit/test_rectangle.cxx
@@ -57,6 +57,17 @@ void Test::test_rectangle()
aRect.SetPosY(12);
CPPUNIT_ASSERT_EQUAL(tools::Long(1), aRect.GetWidth());
}
+
+ {
+ constexpr tools::Rectangle aRect(Point(), Size(-1, -2));
+ static_assert(!aRect.IsEmpty());
+ static_assert(aRect.Right() == 0);
+ static_assert(aRect.Bottom() == -1);
+
+ tools::Rectangle aRect2;
+ aRect2.SetSize(Size(-1, -2));
+ CPPUNIT_ASSERT_EQUAL(aRect, aRect2);
+ }
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);