]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/testing.h
support SDK < 10.6, fixes #14902
[wxWidgets.git] / include / wx / testing.h
index 905184e49337bdda556636c5e7a708c75ce18b85..fce2c508ba73e70b3da5aea203590602e31e5c72 100644 (file)
@@ -76,6 +76,9 @@ private:
 #include <queue>
 #include "wx/afterstd.h"
 #include "wx/cpp.h"
 #include <queue>
 #include "wx/afterstd.h"
 #include "wx/cpp.h"
+#include "wx/dialog.h"
+#include "wx/msgdlg.h"
+#include "wx/filedlg.h"
 
 class wxTestingModalHook;
 
 
 class wxTestingModalHook;
 
@@ -198,6 +201,7 @@ protected:
     int m_id;
 };
 
     int m_id;
 };
 
+#if wxUSE_FILEDLG
 
 template<>
 class wxExpectModal<wxFileDialog> : public wxExpectModalBase<wxFileDialog>
 
 template<>
 class wxExpectModal<wxFileDialog> : public wxExpectModalBase<wxFileDialog>
@@ -219,6 +223,7 @@ protected:
     int m_id;
 };
 
     int m_id;
 };
 
+#endif
 
 // Implementation of wxModalDialogHook for use in testing, with
 // wxExpectModal<T> and the wxTEST_DIALOG() macro. It is not intended for
 
 // Implementation of wxModalDialogHook for use in testing, with
 // wxExpectModal<T> and the wxTEST_DIALOG() macro. It is not intended for
@@ -382,6 +387,7 @@ private:
           wxExpectModal<> for your dialog type and implement its OnInvoked()
           method.
  */
           wxExpectModal<> for your dialog type and implement its OnInvoked()
           method.
  */
+#ifdef wxHAS_VARIADIC_MACROS
 #define wxTEST_DIALOG(codeToRun, ...)                                          \
     {                                                                          \
         wxTEST_DIALOG_HOOK_CLASS wx_hook;                                      \
 #define wxTEST_DIALOG(codeToRun, ...)                                          \
     {                                                                          \
         wxTEST_DIALOG_HOOK_CLASS wx_hook;                                      \
@@ -389,7 +395,7 @@ private:
         codeToRun;                                                             \
         wx_hook.CheckUnmetExpectations();                                      \
     }
         codeToRun;                                                             \
         wx_hook.CheckUnmetExpectations();                                      \
     }
-
+#endif /* wxHAS_VARIADIC_MACROS */
 
 #endif // !WXBUILDING
 
 
 #endif // !WXBUILDING