]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/interactive/output.cpp
Convert wxFSW_EVENT_{WARNING,ERROR} to string correctly.
[wxWidgets.git] / tests / interactive / output.cpp
index 308d2427b76298e75707c9499657aa8b9ebec958..2722ca8952f7d482153e0b83bf91ea0c79f9e973 100644 (file)
     #pragma hdrstop
 #endif
 
+#include "wx/app.h"
+#include "wx/wxcrt.h"           // for wxPuts
+#include "wx/wxcrtvararg.h"     // for wxPrintf
+
 // ----------------------------------------------------------------------------
 // conditional compilation
 // ----------------------------------------------------------------------------
@@ -86,7 +90,7 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( InteractiveOutputTestCase, "InteractiveOu
 // wxDllLoader
 // ----------------------------------------------------------------------------
 
-#if !defined(__WXMSW__) && !defined(__UNIX__)
+#if !defined(__WINDOWS__) && !defined(__UNIX__)
     #undef TEST_DYNLIB
 #endif
 
@@ -115,7 +119,7 @@ void InteractiveOutputTestCase::TestDllListLoaded()
 
         printf(" %s\n", (const char *)details.GetVersion().mb_str());
     }
-    
+
     wxPuts(wxEmptyString);
 #endif // TEST_DYNLIB
 }
@@ -224,14 +228,10 @@ void InteractiveOutputTestCase::TestMimeAssociate()
 #ifdef TEST_MIME
     wxPuts(wxT("*** Testing creation of filetype association ***\n"));
 
-    wxFileTypeInfo ftInfo(
-                            wxT("application/x-xyz"),
-                            wxT("xyzview '%s'"), // open cmd
-                            wxT(""),             // print cmd
-                            wxT("XYZ File"),     // description
-                            wxT(".xyz"),         // extensions
-                            wxNullPtr           // end of extensions
-                         );
+    wxFileTypeInfo ftInfo("application/x-xyz");
+    ftInfo.SetOpenCommand("xyzview '%s'");
+    ftInfo.SetDescription("XYZ File");
+    ftInfo.AddExtension(".xyz");
     ftInfo.SetShortDesc(wxT("XYZFile")); // used under Win32 only
 
     wxFileType *ft = wxTheMimeTypesManager->Associate(ftInfo);
@@ -313,6 +313,8 @@ void InteractiveOutputTestCase::TestUserInfo()
 // stack backtrace
 // ----------------------------------------------------------------------------
 
+#if wxUSE_STACKWALKER
+
 #include "wx/stackwalk.h"
 
 class StackDump : public wxStackWalker
@@ -363,16 +365,20 @@ protected:
         }
     }
 };
+#endif
 
 void InteractiveOutputTestCase::TestStackWalk()
 {
 #ifdef TEST_STACKWALKER
+#if wxUSE_STACKWALKER
     wxPuts(wxT("*** Testing wxStackWalker ***"));
 
-    StackDump dump(wxTheApp->argv[0]);
+    wxString progname(wxTheApp->argv[0]);
+    StackDump dump(progname.utf8_str());
     dump.Walk();
-    
+
     wxPuts("\n");
+#endif
 #endif // TEST_STACKWALKER
 }
 
@@ -381,7 +387,6 @@ void InteractiveOutputTestCase::TestStackWalk()
 // standard paths
 // ----------------------------------------------------------------------------
 
-
 #include "wx/stdpaths.h"
 #include "wx/wxchar.h"      // wxPrintf
 
@@ -411,7 +416,7 @@ void InteractiveOutputTestCase::TestStandardPaths()
                     wxT("fr"),
                     wxStandardPaths::ResourceCat_Messages
                   ).c_str());
-                  
+
     wxPuts("\n");
 #endif // TEST_STDPATHS
 }
@@ -425,8 +430,9 @@ void InteractiveOutputTestCase::TestStandardPaths()
     #undef TEST_VOLUME
 #endif
 
-#include "wx/volume.h"
+#ifdef TEST_VOLUME
 
+#include "wx/volume.h"
 static const wxChar *volumeKinds[] =
 {
     wxT("floppy"),
@@ -437,6 +443,8 @@ static const wxChar *volumeKinds[] =
     wxT("other volume"),
 };
 
+#endif
+
 void InteractiveOutputTestCase::TestFSVolume()
 {
 #ifdef TEST_VOLUME
@@ -471,7 +479,7 @@ void InteractiveOutputTestCase::TestFSVolume()
                  vol.GetFlags() & wxFS_VOL_REMOVABLE ? wxT("removable")
                                                      : wxT("fixed"));
     }
-    
+
     wxPuts("\n");
 #endif // TEST_VOLUME
 }