]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/mbconv/convautotest.cpp
Use wxFindWindowAtPoint() for hit testing in wxPopupTransientWindow.
[wxWidgets.git] / tests / mbconv / convautotest.cpp
index 4bb22253acd97f745f8b1e534e38ce3cb13cc3f9..6a5d5791d1d8a3bca6d11dfb429a991a3ababeef 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     wxConvAuto unit test
 // Author:      Vadim Zeitlin
 // Created:     2006-04-04
-// RCS-ID:      $Id$
 // Copyright:   (c) 2006 Vadim Zeitlin
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -17,6 +16,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_UNICODE
+
 #include "wx/convauto.h"
 
 #include "wx/mstream.h"
@@ -54,7 +55,7 @@ private:
     //
     // the length of the string may need to be passed explicitly if it has
     // embedded NULs, otherwise it's not necessary
-    void TestFirstChar(const char *src, wchar_t wch, int len = wxNO_LEN);
+    void TestFirstChar(const char *src, wchar_t wch, size_t len = wxNO_LEN);
 
     void Empty();
     void Short();
@@ -82,14 +83,14 @@ private:
 // register in the unnamed registry so that these tests are run by default
 CPPUNIT_TEST_SUITE_REGISTRATION(ConvAutoTestCase);
 
-// 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(ConvAutoTestCase, "ConvAutoTestCase");
 
 // ----------------------------------------------------------------------------
 // tests
 // ----------------------------------------------------------------------------
 
-void ConvAutoTestCase::TestFirstChar(const char *src, wchar_t wch, int len)
+void ConvAutoTestCase::TestFirstChar(const char *src, wchar_t wch, size_t len)
 {
     wxWCharBuffer wbuf = wxConvAuto().cMB2WC(src, len, NULL);
     CPPUNIT_ASSERT( wbuf );
@@ -208,3 +209,5 @@ void ConvAutoTestCase::StreamUTF32BE()
                    "\0\0\x03\xB2",
                    20, line1, line2);
 }
+
+#endif // wxUSE_UNICODE