moved Unicode tests to testsuite (patch 943945)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-04-30 20:26:14 +00:00
parent 8ef11eb628
commit 387f829ed1
10 changed files with 164 additions and 52 deletions

View File

@@ -84,7 +84,6 @@
#define TEST_TEXTSTREAM
#define TEST_THREADS
#define TEST_TIMER
#define TEST_UNICODE
// #define TEST_VCARD -- don't enable this (VZ)
// #define TEST_VOLUME --FIXME! (RN)
#define TEST_WCHAR
@@ -3823,43 +3822,6 @@ static void TestFSVolume()
// wide char and Unicode support
// ----------------------------------------------------------------------------
#ifdef TEST_UNICODE
static void TestUnicodeToFromAscii()
{
wxPuts(_T("Testing wxString::To/FromAscii()\n"));
static const char *msg = "Hello, world!";
wxString s = wxString::FromAscii(msg);
wxPrintf(_T("Message in Unicode: %s\n"), s.c_str());
printf("Message in ASCII: %s\n", (const char *)s.ToAscii());
wxPutchar(_T('\n'));
}
#include "wx/textfile.h"
static void TestUnicodeTextFileRead()
{
wxPuts(_T("Testing wxTextFile in Unicode build\n"));
wxTextFile file;
if ( file.Open(_T("testdata.fc"), wxConvLocal) )
{
const size_t count = file.GetLineCount();
for ( size_t n = 0; n < count; n++ )
{
const wxString& s = file[n];
wxPrintf(_T("Line %u: \"%s\" (len %u, last char = '%c')\n"),
(unsigned)n, s.c_str(), (unsigned)s.length(), s.Last());
}
}
}
#endif // TEST_UNICODE
#ifdef TEST_WCHAR
#include "wx/strconv.h"
@@ -5905,13 +5867,6 @@ int main(int argc, char **argv)
TestFSVolume();
#endif // TEST_VOLUME
#ifdef TEST_UNICODE
TestUnicodeTextFileRead();
#if TEST_ALL
TestUnicodeToFromAscii();
#endif
#endif // TEST_UNICODE
#ifdef TEST_WCHAR
TestUtf8();
TestEncodingConverter();