+
+void MetaProgrammingTestCase::MinMax()
+{
+ // test that wxMax(1.1,1) returns float, not long int
+ float f = wxMax(1.1f, 1l);
+ CPPUNIT_ASSERT_EQUAL( 1.1f, f);
+
+ // test that comparing signed and unsigned correctly returns unsigned: this
+ // may seem counterintuitive in this case but this is consistent with the
+ // standard C conversions
+ CPPUNIT_ASSERT_EQUAL( 1, wxMin(-1, 1u) );
+
+ CPPUNIT_ASSERT_EQUAL( -1., wxClip(-1.5, -1, 1) );
+ CPPUNIT_ASSERT_EQUAL( 0, wxClip(0, -1, 1) );
+ CPPUNIT_ASSERT_EQUAL( 1, wxClip(2l, -1, 1) );
+}