diff options
Diffstat (limited to 'test/geometry.cpp')
-rw-r--r-- | test/geometry.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/geometry.cpp b/test/geometry.cpp index 64169206..5760fa3c 100644 --- a/test/geometry.cpp +++ b/test/geometry.cpp @@ -481,6 +481,20 @@ protected: return TestFail; } + Point topLeft(3, 3); + Point bottomRight(30, 30); + Point topRight(30, 3); + Point bottomLeft(3, 30); + Rectangle rect1(topLeft, bottomRight); + Rectangle rect2(topRight, bottomLeft); + Rectangle rect3(bottomRight, topLeft); + Rectangle rect4(bottomLeft, topRight); + + if (rect1 != rect2 || rect1 != rect3 || rect1 != rect4) { + cout << "Point-to-point construction failed" << endl; + return TestFail; + } + return TestPass; } }; |