]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/mbconv/mbconvtest.cpp
Only show the default close button in wxInfoBar if there are no others.
[wxWidgets.git] / tests / mbconv / mbconvtest.cpp
index be18289a77dc7c59e4d764ce11e0a98f2111ebb8..b91fe5954e40b74e815522a89890a00a7f133f7c 100644 (file)
@@ -254,22 +254,22 @@ wxString CByteArrayFormat( const void* data, size_t len, const wxChar* name )
     const unsigned char* bytes = (unsigned char*)data;
     wxString result;
 
-    result.Printf( _T("const static unsigned char %s[%i] = \n{"), name, (int)len );
+    result.Printf( wxT("static const unsigned char %s[%i] = \n{"), name, (int)len );
 
     for ( size_t i = 0; i < len; i++ )
     {
         if ( i != 0 )
         {
-            result.append( _T(",") );
+            result.append( wxT(",") );
         }
         if ((i%16)==0)
         {
-            result.append( _T("\n    ") );
+            result.append( wxT("\n    ") );
         }
-        wxString byte = wxString::Format( _T("0x%02x"), bytes[i] );
+        wxString byte = wxString::Format( wxT("0x%02x"), bytes[i] );
         result.append(byte);
     }
-    result.append( _T("\n};\n") );
+    result.append( wxT("\n};\n") );
     return result;
 }
 
@@ -277,7 +277,7 @@ wxString CByteArrayFormat( const void* data, size_t len, const wxChar* name )
 // characters, encoded in several different formats.
 
 // encoded by iconv
-const static unsigned char welcome_utf7_iconv[84] =
+static const unsigned char welcome_utf7_iconv[84] =
 {
     0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x20,0x74,0x6f,0x20,0x6f,0x75,0x72,0x20,0x63,
     0x79,0x62,0x65,0x72,0x20,0x73,0x70,0x61,0x63,0x65,0x20,0x66,0x6f,0x72,0x63,0x65,
@@ -287,7 +287,7 @@ const static unsigned char welcome_utf7_iconv[84] =
     0x57,0x54,0x41,0x43
 };
 // encoded by wxWindows (iconv can decode this successfully)
-const static unsigned char welcome_utf7_wx[109] =
+static const unsigned char welcome_utf7_wx[109] =
 {
     0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x2b,0x41,0x43,0x41,0x2d,0x74,0x6f,0x2b,0x41,
     0x43,0x41,0x2d,0x6f,0x75,0x72,0x2b,0x41,0x43,0x41,0x2d,0x63,0x79,0x62,0x65,0x72,
@@ -298,7 +298,7 @@ const static unsigned char welcome_utf7_wx[109] =
     0x51,0x77,0x52,0x44,0x42,0x6e,0x4d,0x46,0x6b,0x77,0x41,0x67,0x2d
 };
 // encoded by iconv
-const static unsigned char welcome_utf8[89] =
+static const unsigned char welcome_utf8[89] =
 {
     0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x20,0x74,0x6f,0x20,0x6f,0x75,0x72,0x20,0x63,
     0x79,0x62,0x65,0x72,0x20,0x73,0x70,0x61,0x63,0x65,0x20,0x66,0x6f,0x72,0x63,0x65,
@@ -308,7 +308,7 @@ const static unsigned char welcome_utf8[89] =
     0xe3,0x81,0xa7,0xe3,0x81,0x99,0xe3,0x80,0x82
 };
 // encoded by iconv
-const static unsigned char welcome_utf16le[106] =
+static const unsigned char welcome_utf16le[106] =
 {
     0x57,0x00,0x65,0x00,0x6c,0x00,0x63,0x00,0x6f,0x00,0x6d,0x00,0x65,0x00,0x20,0x00,
     0x74,0x00,0x6f,0x00,0x20,0x00,0x6f,0x00,0x75,0x00,0x72,0x00,0x20,0x00,0x63,0x00,
@@ -319,7 +319,7 @@ const static unsigned char welcome_utf16le[106] =
     0x44,0x30,0x44,0x30,0x67,0x30,0x59,0x30,0x02,0x30
 };
 // encoded by iconv
-const static unsigned char welcome_utf16be[106] =
+static const unsigned char welcome_utf16be[106] =
 {
     0x00,0x57,0x00,0x65,0x00,0x6c,0x00,0x63,0x00,0x6f,0x00,0x6d,0x00,0x65,0x00,0x20,
     0x00,0x74,0x00,0x6f,0x00,0x20,0x00,0x6f,0x00,0x75,0x00,0x72,0x00,0x20,0x00,0x63,
@@ -330,7 +330,7 @@ const static unsigned char welcome_utf16be[106] =
     0x30,0x44,0x30,0x44,0x30,0x67,0x30,0x59,0x30,0x02
 };
 // encoded by iconv
-const static unsigned char welcome_utf32le[212] =
+static const unsigned char welcome_utf32le[212] =
 {
     0x57,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x63,0x00,0x00,0x00,
     0x6f,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x20,0x00,0x00,0x00,
@@ -348,7 +348,7 @@ const static unsigned char welcome_utf32le[212] =
     0x02,0x30,0x00,0x00
 };
 // encoded by iconv
-const static unsigned char welcome_utf32be[212] =
+static const unsigned char welcome_utf32be[212] =
 {
     0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x63,
     0x00,0x00,0x00,0x6f,0x00,0x00,0x00,0x6d,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x20,
@@ -366,7 +366,7 @@ const static unsigned char welcome_utf32be[212] =
     0x00,0x00,0x30,0x02
 };
 // encoded by iconv
-const static unsigned char welcome_cp932[71] =
+static const unsigned char welcome_cp932[71] =
 {
     0x57,0x65,0x6c,0x63,0x6f,0x6d,0x65,0x20,0x74,0x6f,0x20,0x6f,0x75,0x72,0x20,0x63,
     0x79,0x62,0x65,0x72,0x20,0x73,0x70,0x61,0x63,0x65,0x20,0x66,0x6f,0x72,0x63,0x65,
@@ -676,6 +676,9 @@ static const unsigned char CP1252_utf8[386] =
     0x84,0xa2
 };
 
+// this is unused currently so avoid warnings about this
+#if 0
+
 // a character sequence encoded as iso8859-5 (iconv)
 static const unsigned char iso8859_5[251] =
 {
@@ -724,6 +727,7 @@ static const unsigned char iso8859_5_utf8[380] =
     0x92,0xd1,0x93,0xd1,0x94,0xd1,0x95,0xd1,0x96,0xd1,0x97,0xd1,0x98,0xd1,0x99,0xd1,
     0x9a,0xd1,0x9b,0xd1,0x9c,0xd1,0x9e,0xd1,0x9f,0xe2,0x84,0x96
 };
+#endif // 0
 
 // DecodeUTF8
 // decodes the specified *unterminated* UTF-8 byte array
@@ -811,7 +815,7 @@ void MBConvTestCase::FontmapTests()
 
 void MBConvTestCase::BufSize()
 {
-    wxCSConv conv1251(_T("CP1251"));
+    wxCSConv conv1251(wxT("CP1251"));
     CPPUNIT_ASSERT( conv1251.IsOk() );
     const char *cp1251text =
         "\313\301\326\305\324\323\321 \325\304\301\336\316\331\315";
@@ -838,7 +842,7 @@ void MBConvTestCase::BufSize()
 
 
     // test in the other direction too, using an encoding with multibyte NUL
-    wxCSConv convUTF16(_T("UTF-16LE"));
+    wxCSConv convUTF16(wxT("UTF-16LE"));
     CPPUNIT_ASSERT( convUTF16.IsOk() );
     const wchar_t *utf16text = L"Hello";
 
@@ -896,7 +900,7 @@ void MBConvTestCase::Latin1Tests()
     static const char nulstr[] = "foo\0bar\0";
     static const size_t mbLen = WXSIZEOF(nulstr) - 1;
     size_t wcLen;
-    wxWCharBuffer wbuf(wxConvISO8859_1.cMB2WC(nulstr, mbLen, &wcLen));
+    wxConvISO8859_1.cMB2WC(nulstr, mbLen, &wcLen);
     CPPUNIT_ASSERT_EQUAL( mbLen, wcLen );
 }