X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f35ed60d36a163da9b0eda8c2c605392ba85d0c..6757b5e31cb48dd909754fdd5ceb5947585b76e1:/samples/console/console.cpp diff --git a/samples/console/console.cpp b/samples/console/console.cpp index 28087c3c70..04da09d253 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -19,10 +19,6 @@ #include "wx/defs.h" -#if wxUSE_GUI - #error "This sample can't be compiled in GUI mode." -#endif // wxUSE_GUI - #include #include "wx/string.h" @@ -66,6 +62,7 @@ #define TEST_FTP #define TEST_HASH #define TEST_HASHMAP + #define TEST_HASHSET #define TEST_INFO_FUNCTIONS #define TEST_LIST #define TEST_LOCALE @@ -96,7 +93,7 @@ #undef TEST_ALL static const bool TEST_ALL = true; #else - #define TEST_HASHMAP + #define TEST_STRINGS static const bool TEST_ALL = false; #endif @@ -333,7 +330,7 @@ static void TestDirEnum() TestDirEnumHelper(dir, wxDIR_DEFAULT | wxDIR_DOTDOT); wxPuts(_T("Enumerating object files in current directory:")); - TestDirEnumHelper(dir, wxDIR_DEFAULT, "*.o*"); + TestDirEnumHelper(dir, wxDIR_DEFAULT, _T("*.o*")); wxPuts(_T("Enumerating directories in current directory:")); TestDirEnumHelper(dir, wxDIR_DIRS); @@ -359,7 +356,7 @@ static void TestDirEnum() TestDirEnumHelper(dir, wxDIR_FILES | wxDIR_HIDDEN); wxPuts(_T("Enumerating files in non existing directory:")); - wxDir dirNo("nosuchdir"); + wxDir dirNo(_T("nosuchdir")); TestDirEnumHelper(dirNo); } @@ -564,14 +561,14 @@ static void TestExecute() wxPrintf(_T("Testing wxShell: ")); fflush(stdout); - if ( wxShell(SHELL_COMMAND) ) + if ( wxShell(_T(SHELL_COMMAND)) ) wxPuts(_T("Ok.")); else wxPuts(_T("ERROR.")); wxPrintf(_T("Testing wxExecute: ")); fflush(stdout); - if ( wxExecute(COMMAND, true /* sync */) == 0 ) + if ( wxExecute(_T(COMMAND), true /* sync */) == 0 ) wxPuts(_T("Ok.")); else wxPuts(_T("ERROR.")); @@ -587,7 +584,7 @@ static void TestExecute() wxPrintf(_T("Testing wxExecute with redirection:\n")); wxArrayString output; - if ( wxExecute(REDIRECT_COMMAND, output) != 0 ) + if ( wxExecute(_T(REDIRECT_COMMAND), output) != 0 ) { wxPuts(_T("ERROR.")); } @@ -701,8 +698,8 @@ static void TestFileCopy() } else { - wxFFile f1(filename1, "rb"), - f2(filename2, "rb"); + wxFFile f1(filename1, _T("rb")), + f2(filename2, _T("rb")); if ( !f1.IsOpened() || !f2.IsOpened() ) { @@ -1011,11 +1008,11 @@ static void TestFileNameMakeRelative() switch ( fni.format ) { case wxPATH_UNIX: - base = "/usr/bin/"; + base = _T("/usr/bin/"); break; case wxPATH_DOS: - base = "c:\\"; + base = _T("c:\\"); break; case wxPATH_MAC: @@ -1025,7 +1022,7 @@ static void TestFileNameMakeRelative() case wxPATH_NATIVE: // make gcc happy default: - wxFAIL_MSG( "unexpected path format" ); + wxFAIL_MSG( _T("unexpected path format") ); } wxPrintf(_T("'%s' relative to '%s': "), @@ -1150,11 +1147,12 @@ static void TestHash() wxPuts(_T("*** Testing wxHashTable ***\n")); { - wxHashTable hash(wxKEY_INTEGER), hash2(wxKEY_STRING); + wxHashTable hash(wxKEY_INTEGER, 10), hash2(wxKEY_STRING); + wxObject o; int i; for ( i = 0; i < 100; ++i ) - hash.Put(i, (wxObject*)&i + i); + hash.Put(i, &o + i); hash.BeginFind(); wxHashTable::compatibility_iterator it = hash.Next(); @@ -1170,18 +1168,50 @@ static void TestHash() wxPuts(_T("Error in wxHashTable::compatibility_iterator\n")); for ( i = 99; i >= 0; --i ) - if( hash.Get(i) != (wxObject*)&i + i ) + if( hash.Get(i) != &o + i ) wxPuts(_T("Error in wxHashTable::Get/Put\n")); - hash2.Put("foo", (wxObject*)&i + 1); - hash2.Put("bar", (wxObject*)&i + 2); - hash2.Put("baz", (wxObject*)&i + 3); + for ( i = 0; i < 100; ++i ) + hash.Put(i, &o + i + 20); + + for ( i = 99; i >= 0; --i ) + if( hash.Get(i) != &o + i) + wxPuts(_T("Error (2) in wxHashTable::Get/Put\n")); + + for ( i = 0; i < 50; ++i ) + if( hash.Delete(i) != &o + i) + wxPuts(_T("Error in wxHashTable::Delete\n")); - if (hash2.Get("moo") != NULL) + for ( i = 50; i < 100; ++i ) + if( hash.Get(i) != &o + i) + wxPuts(_T("Error (3) in wxHashTable::Get/Put\n")); + + for ( i = 0; i < 50; ++i ) + if( hash.Get(i) != &o + i + 20) + wxPuts(_T("Error (4) in wxHashTable::Put/Delete\n")); + + for ( i = 0; i < 50; ++i ) + if( hash.Delete(i) != &o + i + 20) + wxPuts(_T("Error (2) in wxHashTable::Delete\n")); + + for ( i = 0; i < 50; ++i ) + if( hash.Get(i) != NULL) + wxPuts(_T("Error (5) in wxHashTable::Put/Delete\n")); + + hash2.Put(_T("foo"), &o + 1); + hash2.Put(_T("bar"), &o + 2); + hash2.Put(_T("baz"), &o + 3); + + if (hash2.Get(_T("moo")) != NULL) wxPuts(_T("Error in wxHashTable::Get\n")); - if (hash2.Get("bar") != (wxObject*)&i + 2) + if (hash2.Get(_T("bar")) != &o + 2) wxPuts(_T("Error in wxHashTable::Get/Put\n")); + + hash2.Put(_T("bar"), &o + 0); + + if (hash2.Get(_T("bar")) != &o + 2) + wxPuts(_T("Error (2) in wxHashTable::Get/Put\n")); } #if !wxUSE_STL { @@ -1387,6 +1417,100 @@ static void TestHashMap() #endif // TEST_HASHMAP +// ---------------------------------------------------------------------------- +// wxHashSet +// ---------------------------------------------------------------------------- + +#ifdef TEST_HASHSET + +#include "wx/hashset.h" + +// test compilation of basic map types +WX_DECLARE_HASH_SET( int*, wxPointerHash, wxPointerEqual, myPtrHashSet ); +WX_DECLARE_HASH_SET( long, wxIntegerHash, wxIntegerEqual, myLongHashSet ); +WX_DECLARE_HASH_SET( unsigned long, wxIntegerHash, wxIntegerEqual, + myUnsignedHashSet ); +WX_DECLARE_HASH_SET( unsigned int, wxIntegerHash, wxIntegerEqual, + myTestHashSet1 ); +WX_DECLARE_HASH_SET( int, wxIntegerHash, wxIntegerEqual, + myTestHashSet2 ); +WX_DECLARE_HASH_SET( short, wxIntegerHash, wxIntegerEqual, + myTestHashSet3 ); +WX_DECLARE_HASH_SET( unsigned short, wxIntegerHash, wxIntegerEqual, + myTestHashSet4 ); +WX_DECLARE_HASH_SET( wxString, wxStringHash, wxStringEqual, + myTestHashSet5 ); + +struct MyStruct +{ + int* ptr; + wxString str; +}; + +class MyHash +{ +public: + unsigned long operator()(const MyStruct& s) const + { return m_dummy(s.ptr); } + MyHash& operator=(const MyHash&) { return *this; } +private: + wxPointerHash m_dummy; +}; + +class MyEqual +{ +public: + bool operator()(const MyStruct& s1, const MyStruct& s2) const + { return s1.ptr == s2.ptr; } + MyEqual& operator=(const MyEqual&) { return *this; } +}; + +WX_DECLARE_HASH_SET( MyStruct, MyHash, MyEqual, mySet ); + +typedef myTestHashSet5 wxStringHashSet; + +static void TestHashSet() +{ + wxPrintf(_T("*** Testing wxHashSet ***\n")); + + wxStringHashSet set1; + + set1.insert( _T("abc") ); + set1.insert( _T("bbc") ); + set1.insert( _T("cbc") ); + set1.insert( _T("abc") ); + + if( set1.size() != 3 ) + wxPrintf(_T("*** ERROR IN INSERT ***\n")); + + mySet set2; + int dummy; + MyStruct tmp; + + tmp.ptr = &dummy; tmp.str = _T("ABC"); + set2.insert( tmp ); + tmp.ptr = &dummy + 1; + set2.insert( tmp ); + tmp.ptr = &dummy; tmp.str = _T("CDE"); + set2.insert( tmp ); + + if( set2.size() != 2 ) + wxPrintf(_T("*** ERROR IN INSERT - 2 ***\n")); + + mySet::iterator it = set2.find( tmp ); + + if( it == set2.end() ) + wxPrintf(_T("*** ERROR IN FIND - 1 ***\n")); + if( it->ptr != &dummy ) + wxPrintf(_T("*** ERROR IN FIND - 2 ***\n")); + if( it->str != _T("ABC") ) + wxPrintf(_T("*** ERROR IN INSERT - 3 ***\n")); + + wxPrintf(_T("*** Finished testing wxHashSet ***\n")); +} + +#endif // TEST_HASHSET + // ---------------------------------------------------------------------------- // wxList // ---------------------------------------------------------------------------- @@ -2132,7 +2256,7 @@ static void TestLongLongConversion() #if wxUSE_LONGLONG_NATIVE wxLongLongNative b(a.GetHi(), a.GetLo()); - wxASSERT_MSG( a == b, "conversions failure" ); + wxASSERT_MSG( a == b, _T("conversions failure") ); #else wxPuts(_T("Can't do it without native long long type, test skipped.")); @@ -2166,7 +2290,7 @@ static void TestMultiplication() wxLongLongNative aa(a.GetHi(), a.GetLo()); wxLongLongNative bb(b.GetHi(), b.GetLo()); - wxASSERT_MSG( a*b == aa*bb, "multiplication failure" ); + wxASSERT_MSG( a*b == aa*bb, _T("multiplication failure") ); #else // !wxUSE_LONGLONG_NATIVE wxPuts(_T("Can't do it without native long long type, test skipped.")); @@ -2213,7 +2337,7 @@ static void TestDivision() wxLongLongNative m(ll.GetHi(), ll.GetLo()); wxLongLongNative p = m / l, s = m % l; - wxASSERT_MSG( q == p && r == s, "division failure" ); + wxASSERT_MSG( q == p && r == s, _T("division failure") ); #else // !wxUSE_LONGLONG_NATIVE // verify the result wxASSERT_MSG( ll == q*l + r, "division failure" ); @@ -2246,7 +2370,7 @@ static void TestAddition() #if wxUSE_LONGLONG_NATIVE wxASSERT_MSG( c == wxLongLongNative(a.GetHi(), a.GetLo()) + wxLongLongNative(b.GetHi(), b.GetLo()), - "addition failure" ); + _T("addition failure") ); #else // !wxUSE_LONGLONG_NATIVE wxASSERT_MSG( c - b == a, "addition failure" ); #endif // wxUSE_LONGLONG_NATIVE @@ -2894,7 +3018,10 @@ I am ready for my first lesson today."); wxChar buf[200]; wxSprintf(buf, _T("%07") wxLongLongFmtSpec _T("o"), wxLL(040000000000)); + #if 0 + // for some reason below line fails under Borland wxPrintf (_T("sprintf (buf, \"%%07Lo\", 040000000000ll) = %s"), buf); + #endif if (wxStrcmp (buf, _T("40000000000")) != 0) { @@ -3100,26 +3227,26 @@ static void TestRegistryAssociation() wxRegKey key; - key.SetName("HKEY_CLASSES_ROOT\\.ddf" ); + key.SetName(_T("HKEY_CLASSES_ROOT\\.ddf") ); key.Create(); - key = "ddxf_auto_file" ; - key.SetName("HKEY_CLASSES_ROOT\\.flo" ); + key = _T("ddxf_auto_file") ; + key.SetName(_T("HKEY_CLASSES_ROOT\\.flo") ); key.Create(); - key = "ddxf_auto_file" ; - key.SetName("HKEY_CLASSES_ROOT\\ddxf_auto_file\\DefaultIcon"); + key = _T("ddxf_auto_file") ; + key.SetName(_T("HKEY_CLASSES_ROOT\\ddxf_auto_file\\DefaultIcon")); key.Create(); - key = "program,0" ; - key.SetName("HKEY_CLASSES_ROOT\\ddxf_auto_file\\shell\\open\\command"); + key = _T("program,0") ; + key.SetName(_T("HKEY_CLASSES_ROOT\\ddxf_auto_file\\shell\\open\\command")); key.Create(); - key = "program \"%1\"" ; + key = _T("program \"%1\"") ; - key.SetName("HKEY_CLASSES_ROOT\\.ddf" ); + key.SetName(_T("HKEY_CLASSES_ROOT\\.ddf") ); key.DeleteSelf(); - key.SetName("HKEY_CLASSES_ROOT\\.flo" ); + key.SetName(_T("HKEY_CLASSES_ROOT\\.flo") ); key.DeleteSelf(); - key.SetName("HKEY_CLASSES_ROOT\\ddxf_auto_file\\DefaultIcon"); + key.SetName(_T("HKEY_CLASSES_ROOT\\ddxf_auto_file\\DefaultIcon")); key.DeleteSelf(); - key.SetName("HKEY_CLASSES_ROOT\\ddxf_auto_file\\shell\\open\\command"); + key.SetName(_T("HKEY_CLASSES_ROOT\\ddxf_auto_file\\shell\\open\\command")); key.DeleteSelf(); } @@ -3517,7 +3644,7 @@ static void TestFtpMisc() { wxPuts(_T("*** Testing miscellaneous wxFTP functions ***")); - if ( ftp.SendCommand("STAT") != '2' ) + if ( ftp.SendCommand(_T("STAT")) != '2' ) { wxPuts(_T("ERROR: STAT failed")); } @@ -3526,7 +3653,7 @@ static void TestFtpMisc() wxPrintf(_T("STAT returned:\n\n%s\n"), ftp.GetLastResult().c_str()); } - if ( ftp.SendCommand("HELP SITE") != '2' ) + if ( ftp.SendCommand(_T("HELP SITE")) != '2' ) { wxPuts(_T("ERROR: HELP SITE failed")); } @@ -3555,14 +3682,14 @@ static void TestFtpInteractive() // special handling of LIST and NLST as they require data connection wxString start(buf, 4); start.MakeUpper(); - if ( start == "LIST" || start == "NLST" ) + if ( start == _T("LIST") || start == _T("NLST") ) { wxString wildcard; if ( wxStrlen(buf) > 4 ) wildcard = buf + 5; wxArrayString files; - if ( !ftp.GetList(files, wildcard, start == "LIST") ) + if ( !ftp.GetList(files, wildcard, start == _T("LIST")) ) { wxPrintf(_T("ERROR: failed to get %s of files\n"), start.c_str()); } @@ -3610,7 +3737,7 @@ static void TestFtpUpload() } // send a command to check the remote file - if ( ftp.SendCommand(wxString("STAT ") + file1) != '2' ) + if ( ftp.SendCommand(wxString(_T("STAT ")) + file1) != '2' ) { wxPrintf(_T("ERROR: STAT %s failed\n"), file1); } @@ -5987,12 +6114,12 @@ static void TestArrayOfObjects() { ArrayBars bars; - Bar bar("second bar (two copies!)"); + Bar bar(_T("second bar (two copies!)")); wxPrintf(_T("Initially: %u objects in the array, %u objects total.\n"), bars.GetCount(), Bar::GetNumber()); - bars.Add(new Bar("first bar")); + bars.Add(new Bar(_T("first bar"))); bars.Add(bar,2); wxPrintf(_T("Now: %u objects in the array, %u objects total.\n"), @@ -6423,6 +6550,20 @@ void is(int line, const wxString& got, const wxString& expected, } } +#if 0 +void is(int line, const wxChar* got, const wxChar* expected, + const wxString& msg = wxEmptyString) +{ + bool isOk = wxStrcmp( got, expected ) == 0; + ok(line, isOk, msg); + if( !isOk ) + { + wxPuts(_T("Got: ") + wxString(got)); + wxPuts(_T("Expected: ") + wxString(expected)); + } +} +#endif + void is(int line, const wxChar& got, const wxChar& expected, const wxString& msg = wxEmptyString) { @@ -6430,11 +6571,26 @@ void is(int line, const wxChar& got, const wxChar& expected, ok(line, isOk, msg); if( !isOk ) { - wxPuts("Got: " + got); - wxPuts("Expected: " + expected); + wxPuts(_T("Got: ") + got); + wxPuts(_T("Expected: ") + expected); } } +void is(int line, size_t got, size_t expected, + const wxString& msg = wxEmptyString) +{ + bool isOk = got == expected; + ok(line, isOk, msg); + if( !isOk ) + { + wxPuts(wxString::Format(_T("Got: %ld"), got)); + wxPuts(wxString::Format(_T("Expected: %ld"), expected)); + } +} + +#define is_m( got, expected, message ) is( __LINE__, (got), (expected), (message) ) +#define is_nom( got, expected ) is( __LINE__, (got), (expected), wxEmptyString ) + void TestStdString() { wxPuts(_T("*** Testing std::string operations ***\n")); @@ -6524,6 +6680,77 @@ void TestStdString() is( __LINE__, *it2, _T('g') ); ok( __LINE__, it3 == s7.end() ); + // find + // 0 1 2 + // 01234567890123456789012345 + s1 = _T("abcdefgABCDEFGabcABCabcABC"); + s2 = _T("gAB"); + + is_nom( s1.find(_T('A')), 7u ); + is_nom( s1.find(_T('A'), 7), 7u ); + is_nom( s1.find(_T('Z')), wxString::npos ); + is_nom( s1.find(_T('C'), 22), 25u ); + + is_nom( s1.find(_T("gAB")), 6u ); + is_nom( s1.find(_T("gAB"), 7), wxString::npos ); + is_nom( s1.find(_T("gAB"), 6), 6u ); + + is_nom( s1.find(_T("gABZZZ"), 2, 3), 6u ); + is_nom( s1.find(_T("gABZZZ"), 7, 3), wxString::npos ); + + is_nom( s1.find(s2), 6u ); + is_nom( s1.find(s2, 7), wxString::npos ); + is_nom( s1.find(s2, 6), 6u ); + + // find_first_not_of + // 0 1 2 3 + // 01234567890123456789012345678901234 + s1 = _T("aaaaaabcdefghlkjiaaaaaabcdbcdbcdbcd"); + s2 = _T("aaaaaa"); + + is_nom( s1.find_first_not_of(_T('a')), 6u ); + is_nom( s1.find_first_not_of(_T('a'), 7), 7u ); + is_nom( s2.find_first_not_of(_T('a')), wxString::npos ); + + is_nom( s1.find_first_not_of(_T("abde"), 4), 7u ); + is_nom( s1.find_first_not_of(_T("abde"), 7), 7u ); + is_nom( s1.find_first_not_of(_T("abcdefghijkl")), wxString::npos ); + + is_nom( s1.find_first_not_of(_T("abcdefghi"), 0, 4), 9u ); + + // find_first_of + is_nom( s1.find_first_of(_T('c')), 7u ); + is_nom( s1.find_first_of(_T('v')), wxString::npos ); + is_nom( s1.find_first_of(_T('c'), 10), 24u ); + + is_nom( s1.find_first_of(_T("ijkl")), 13u ); + is_nom( s1.find_first_of(_T("ddcfg"), 17), 24u ); + is_nom( s1.find_first_of(_T("ddcfga"), 17, 5), 24u ); + + // find_last_not_of + // 0 1 2 3 + // 01234567890123456789012345678901234 + s1 = _T("aaaaaabcdefghlkjiaaaaaabcdbcdbcdbcd"); + s2 = _T("aaaaaa"); + + is_nom( s2.find_last_not_of(_T('a')), wxString::npos ); + is_nom( s1.find_last_not_of(_T('d')), 33u ); + is_nom( s1.find_last_not_of(_T('d'), 25), 24u ); + + is_nom( s1.find_last_not_of(_T("bcd")), 22u ); + is_nom( s1.find_last_not_of(_T("abc"), 24), 16u ); + + is_nom( s1.find_last_not_of(_T("abcdefghijklmnopqrstuv"), 24, 3), 16u ); + + // find_last_of + is_nom( s2.find_last_of(_T('c')), wxString::npos ); + is_nom( s1.find_last_of(_T('a')), 22u ); + is_nom( s1.find_last_of(_T('b'), 24), 23u ); + + is_nom( s1.find_last_of(_T("ijklm")), 16u ); + is_nom( s1.find_last_of(_T("ijklma"), 33, 4), 16u ); + is_nom( s1.find_last_of(_T("a"), 17), 17u ); + // test insert s1 = s2 = s3 = s4 = s5 = s6 = s7 = s8 = _T("aaaa"); s9 = s10 = _T("cdefg"); @@ -6574,6 +6801,51 @@ void TestStdString() is( __LINE__, s6, s9); is( __LINE__, s7, _T("QWwertyP") ); + // rfind + // 0 1 2 + // 01234567890123456789012345 + s1 = _T("abcdefgABCDEFGabcABCabcABC"); + s2 = _T("gAB"); + s3 = _T("ab"); + + is_nom( s1.rfind(_T('A')), 23u ); + is_nom( s1.rfind(_T('A'), 7), 7u ); + is_nom( s1.rfind(_T('Z')), wxString::npos ); + is_nom( s1.rfind(_T('C'), 22), 19u ); + + is_nom( s1.rfind(_T("cAB")), 22u ); + is_nom( s1.rfind(_T("cAB"), 15), wxString::npos ); + is_nom( s1.rfind(_T("cAB"), 21), 16u ); + + is_nom( s1.rfind(_T("gABZZZ"), 7, 3), 6u ); + is_nom( s1.rfind(_T("gABZZZ"), 5, 3), wxString::npos ); + + is_nom( s1.rfind(s2), 6u ); + is_nom( s1.rfind(s2, 5), wxString::npos ); + is_nom( s1.rfind(s2, 6), 6u ); + is_nom( s1.rfind(s3, 1), 0u ); + + // resize + s1 = s2 = s3 = s4 = _T("abcABCdefDEF"); + + s1.resize( 12 ); + s2.resize( 10 ); + s3.resize( 14, _T(' ') ); + s4.resize( 14, _T('W') ); + + is_nom( s1, _T("abcABCdefDEF") ); + is_nom( s2, _T("abcABCdefD") ); + is_nom( s3, _T("abcABCdefDEF ") ); + is_nom( s4, _T("abcABCdefDEFWW") ); + + // substr + s1 = _T("abcdefgABCDEFG"); + + is_nom( s1.substr( 0, 14 ), s1 ); + is_nom( s1.substr( 1, 13 ), _T("bcdefgABCDEFG") ); + is_nom( s1.substr( 1, 20 ), _T("bcdefgABCDEFG") ); + is_nom( s1.substr( 14, 30 ), _T("") ); + wxPuts(_T("*** Testing std::string operations finished ***\n")); } @@ -6652,7 +6924,9 @@ int main(int argc, char **argv) wxChar **wargv = new wxChar *[argc + 1]; { - for ( int n = 0; n < argc; n++ ) + int n; + + for (n = 0; n < argc; n++ ) { wxMB2WXbuf warg = wxConvertMB2WX(argv[n]); wargv[n] = wxStrdup(warg); @@ -6760,11 +7034,11 @@ int main(int argc, char **argv) #endif wxPuts(_T("*** After sorting a1")); - a1.Sort(wxStringCompareAscending); + a1.Sort(false); PrintArray(_T("a1"), a1); wxPuts(_T("*** After sorting a1 in reverse order")); - a1.Sort(wxStringCompareDescending); + a1.Sort(true); PrintArray(_T("a1"), a1); #if !wxUSE_STL @@ -6930,6 +7204,10 @@ int main(int argc, char **argv) TestHashMap(); #endif // TEST_HASHMAP +#ifdef TEST_HASHSET + TestHashSet(); +#endif // TEST_HASHSET + #ifdef TEST_MIME wxLog::AddTraceMask(_T("mime")); if ( TEST_ALL )