X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/87f528f15b7b0ef31c992d1bc474b6fbcaba95f9..f155075229d771430f0793700f5048ad4be00e9d:/tests/strings/unichar.cpp diff --git a/tests/strings/unichar.cpp b/tests/strings/unichar.cpp index db96f4ba81..e955aa0b9b 100644 --- a/tests/strings/unichar.cpp +++ b/tests/strings/unichar.cpp @@ -54,7 +54,7 @@ private: // register in the unnamed registry so that these tests are run by default CPPUNIT_TEST_SUITE_REGISTRATION( UniCharTestCase ); -// 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( UniCharTestCase, "UniCharTestCase" ); void UniCharTestCase::CharCompare() @@ -68,48 +68,96 @@ void UniCharTestCase::CharCompare() CPPUNIT_ASSERT( a == wxUniChar('a') ); CPPUNIT_ASSERT( a == wxUniChar(wxT('a')) ); + CPPUNIT_ASSERT( a == a ); + CPPUNIT_ASSERT( 'a' == a ); + CPPUNIT_ASSERT( wxT('a') == a ); + CPPUNIT_ASSERT( wxUniChar('a') == a ); + CPPUNIT_ASSERT( wxUniChar(wxT('a')) == a ); + CPPUNIT_ASSERT( a != b ); CPPUNIT_ASSERT( a != 'b' ); CPPUNIT_ASSERT( a != wxT('b') ); CPPUNIT_ASSERT( a != wxUniChar('b') ); CPPUNIT_ASSERT( a != wxUniChar(wxT('b')) ); + CPPUNIT_ASSERT( b != a ); + CPPUNIT_ASSERT( 'b' != a ); + CPPUNIT_ASSERT( wxT('b') != a ); + CPPUNIT_ASSERT( wxUniChar('b') != a ); + CPPUNIT_ASSERT( wxUniChar(wxT('b')) != a ); + CPPUNIT_ASSERT( a < b ); CPPUNIT_ASSERT( a < 'b' ); CPPUNIT_ASSERT( a < wxT('b') ); CPPUNIT_ASSERT( a < wxUniChar('b') ); CPPUNIT_ASSERT( a < wxUniChar(wxT('b')) ); + CPPUNIT_ASSERT( b > a ); + CPPUNIT_ASSERT( 'b' > a ); + CPPUNIT_ASSERT( wxT('b') > a ); + CPPUNIT_ASSERT( wxUniChar('b') > a ); + CPPUNIT_ASSERT( wxUniChar(wxT('b')) > a ); + CPPUNIT_ASSERT( a <= b ); CPPUNIT_ASSERT( a <= 'b' ); CPPUNIT_ASSERT( a <= wxT('b') ); CPPUNIT_ASSERT( a <= wxUniChar('b') ); CPPUNIT_ASSERT( a <= wxUniChar(wxT('b')) ); + CPPUNIT_ASSERT( b >= a ); + CPPUNIT_ASSERT( 'b' >= a ); + CPPUNIT_ASSERT( wxT('b') >= a ); + CPPUNIT_ASSERT( wxUniChar('b') >= a ); + CPPUNIT_ASSERT( wxUniChar(wxT('b')) >= a ); + CPPUNIT_ASSERT( a <= a ); CPPUNIT_ASSERT( a <= 'a' ); CPPUNIT_ASSERT( a <= wxT('a') ); CPPUNIT_ASSERT( a <= wxUniChar('a') ); CPPUNIT_ASSERT( a <= wxUniChar(wxT('a')) ); + CPPUNIT_ASSERT( a >= a ); + CPPUNIT_ASSERT( 'a' >= a ); + CPPUNIT_ASSERT( wxT('a') >= a ); + CPPUNIT_ASSERT( wxUniChar('a') >= a ); + CPPUNIT_ASSERT( wxUniChar(wxT('a')) >= a ); + CPPUNIT_ASSERT( b > a ); CPPUNIT_ASSERT( b > 'a' ); CPPUNIT_ASSERT( b > wxT('a') ); CPPUNIT_ASSERT( b > wxUniChar('a') ); CPPUNIT_ASSERT( b > wxUniChar(wxT('a')) ); + CPPUNIT_ASSERT( a < b ); + CPPUNIT_ASSERT( 'a' < b ); + CPPUNIT_ASSERT( wxT('a') < b ); + CPPUNIT_ASSERT( wxUniChar('a') < b ); + CPPUNIT_ASSERT( wxUniChar(wxT('a')) < b ); + CPPUNIT_ASSERT( b >= a ); CPPUNIT_ASSERT( b >= 'a' ); CPPUNIT_ASSERT( b >= wxT('a') ); CPPUNIT_ASSERT( b >= wxUniChar('a') ); CPPUNIT_ASSERT( b >= wxUniChar(wxT('a')) ); + CPPUNIT_ASSERT( a <= b ); + CPPUNIT_ASSERT( 'a' <= b ); + CPPUNIT_ASSERT( wxT('a') <= b ); + CPPUNIT_ASSERT( wxUniChar('a') <= b ); + CPPUNIT_ASSERT( wxUniChar(wxT('a')) <= b ); + CPPUNIT_ASSERT( b >= b ); CPPUNIT_ASSERT( b >= 'b' ); CPPUNIT_ASSERT( b >= wxT('b') ); CPPUNIT_ASSERT( b >= wxUniChar('b') ); CPPUNIT_ASSERT( b >= wxUniChar(wxT('b')) ); + CPPUNIT_ASSERT( b <= b ); + CPPUNIT_ASSERT( 'b' <= b ); + CPPUNIT_ASSERT( wxT('b') <= b ); + CPPUNIT_ASSERT( wxUniChar('b') <= b ); + CPPUNIT_ASSERT( wxUniChar(wxT('b')) <= b ); + CPPUNIT_ASSERT( b - a == 1 ); CPPUNIT_ASSERT( a - b == -1 ); }