]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/geometry/point.cpp
Add virtual ~wxAnyScrollHelperBase() to fix compiler warning.
[wxWidgets.git] / tests / geometry / point.cpp
index b81e836efe36c6a088c724076427c351bc6a40f3..c345bfd78b70bcb4706bf41a34262353cc801935 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxPoint unit test
 // Author:      Wlodzimierz ABX Skiba
 // Created:     2004-12-14
-// RCS-ID:      $Id$
 // Copyright:   (c) 2004 wxWindows
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -21,6 +20,8 @@
     #include "wx/gdicmn.h"
 #endif // WX_PRECOMP
 
+#include "wx/math.h"
+
 // ----------------------------------------------------------------------------
 // test class
 // ----------------------------------------------------------------------------
@@ -59,7 +60,7 @@ private:
 CPPUNIT_TEST_SUITE_REGISTRATION( PointTestCase );
 CPPUNIT_TEST_SUITE_REGISTRATION( RealPointTestCase );
 
-// also include in it's own registry so that these tests can be run alone
+// also include in its own registry so that these tests can be run alone
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( PointTestCase, "PointTestCase" );
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( RealPointTestCase, "RealPointTestCase" );
 
@@ -85,6 +86,10 @@ void PointTestCase::Operators()
     p6 = p2; p6 = p2 - s;
     CPPUNIT_ASSERT( p3 == p5 );
     CPPUNIT_ASSERT( p4 == p6 );
+    p5 = p2; p5 = s + p2;
+    p6 = p2; p6 = s - p2;
+    CPPUNIT_ASSERT( p3 == p5 );
+    CPPUNIT_ASSERT( p4 == -p6 );
     p5 = p2; p5 += s;
     p6 = p2; p6 -= s;
     CPPUNIT_ASSERT( p3 == p5 );