From 10e6908dd350c6164671534b75f795cfd8c7732b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 23 Jun 2013 16:38:51 +0000 Subject: [PATCH] Add a minimal unit test for wxSimplebook. This is just a test running the common wxBookCtrlBase tests for wxSimplebook. See #15188. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/Makefile.in | 4 ++ tests/controls/simplebooktest.cpp | 70 ++++++++++++++++++++++++ tests/makefile.bcc | 68 ++++++++++++----------- tests/makefile.gcc | 72 +++++++++++++------------ tests/makefile.vc | 68 ++++++++++++----------- tests/makefile.wat | 90 ++++++++++++++++--------------- tests/test.bkl | 1 + tests/test_test.dsp | 2 +- tests/test_test_gui.dsp | 14 +++-- tests/test_vc7_test_gui.vcproj | 3 ++ tests/test_vc8_test_gui.vcproj | 4 ++ tests/test_vc9_test_gui.vcproj | 4 ++ 12 files changed, 253 insertions(+), 147 deletions(-) create mode 100644 tests/controls/simplebooktest.cpp diff --git a/tests/Makefile.in b/tests/Makefile.in index 0bf16f8332..dd1a61078f 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -192,6 +192,7 @@ TEST_GUI_OBJECTS = \ test_gui_rearrangelisttest.o \ test_gui_richtextctrltest.o \ test_gui_searchctrltest.o \ + test_gui_simplebooktest.o \ test_gui_slidertest.o \ test_gui_spinctrldbltest.o \ test_gui_spinctrltest.o \ @@ -832,6 +833,9 @@ test_gui_richtextctrltest.o: $(srcdir)/controls/richtextctrltest.cpp $(TEST_GUI_ test_gui_searchctrltest.o: $(srcdir)/controls/searchctrltest.cpp $(TEST_GUI_ODEP) $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/searchctrltest.cpp +test_gui_simplebooktest.o: $(srcdir)/controls/simplebooktest.cpp $(TEST_GUI_ODEP) + $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/simplebooktest.cpp + test_gui_slidertest.o: $(srcdir)/controls/slidertest.cpp $(TEST_GUI_ODEP) $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/controls/slidertest.cpp diff --git a/tests/controls/simplebooktest.cpp b/tests/controls/simplebooktest.cpp new file mode 100644 index 0000000000..59164f1c2f --- /dev/null +++ b/tests/controls/simplebooktest.cpp @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: tests/controls/simplebooktest.cpp +// Purpose: wxSimplebook unit test +// Author: Vadim Zeitlin +// Created: 2013-06-23 +// RCS-ID: $Id$ +// Copyright: (c) 2013 Vadim Zeitlin +/////////////////////////////////////////////////////////////////////////////// + +#include "testprec.h" + +#if wxUSE_BOOKCTRL + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/panel.h" +#endif // WX_PRECOMP + +#include "wx/simplebook.h" +#include "bookctrlbasetest.h" + +class SimplebookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase +{ +public: + SimplebookTestCase() { } + + virtual void setUp(); + virtual void tearDown(); + +private: + virtual wxBookCtrlBase *GetBase() const { return m_simplebook; } + + virtual wxEventType GetChangedEvent() const + { return wxEVT_BOOKCTRL_PAGE_CHANGED; } + + virtual wxEventType GetChangingEvent() const + { return wxEVT_BOOKCTRL_PAGE_CHANGING; } + + CPPUNIT_TEST_SUITE( SimplebookTestCase ); + wxBOOK_CTRL_BASE_TESTS(); + CPPUNIT_TEST_SUITE_END(); + + wxSimplebook *m_simplebook; + + DECLARE_NO_COPY_CLASS(SimplebookTestCase) +}; + +// register in the unnamed registry so that these tests are run by default +CPPUNIT_TEST_SUITE_REGISTRATION( SimplebookTestCase ); + +// also include in its own registry so that these tests can be run alone +CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SimplebookTestCase, "SimplebookTestCase" ); + +void SimplebookTestCase::setUp() +{ + m_simplebook = new wxSimplebook(wxTheApp->GetTopWindow(), wxID_ANY); + AddPanels(); +} + +void SimplebookTestCase::tearDown() +{ + wxDELETE(m_simplebook); +} + +#endif // wxUSE_BOOKCTRL + diff --git a/tests/makefile.bcc b/tests/makefile.bcc index 1759908eb9..74b2218b56 100644 --- a/tests/makefile.bcc +++ b/tests/makefile.bcc @@ -30,10 +30,10 @@ LIBDIRNAME = \ SETUPHDIR = \ $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) TEST_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ - $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WX$(TOOLKIT)__ \ - $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ - $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ - $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WX$(TOOLKIT)__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ + $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ $(____CAIRO_INCLUDEDIR_FILENAMES) -I. $(__DLLFLAG_p) -DwxUSE_GUI=0 \ $(CPPUNIT_CFLAGS) -Hu -H=$(OBJS)\testprec_test.csm $(CPPFLAGS) $(CXXFLAGS) TEST_OBJECTS = \ @@ -122,10 +122,10 @@ TEST_OBJECTS = \ $(OBJS)\test_xlocale.obj \ $(OBJS)\test_xmltest.obj TEST_GUI_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ - $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WX$(TOOLKIT)__ \ - $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ - $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ - $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WX$(TOOLKIT)__ \ + $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ + $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ $(____CAIRO_INCLUDEDIR_FILENAMES) -I. $(__DLLFLAG_p) -I.\..\samples -DNOPCH \ $(CPPUNIT_CFLAGS) -Hu -H=$(OBJS)\testprec_test_gui.csm $(CPPFLAGS) \ $(CXXFLAGS) @@ -177,7 +177,8 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_radiobuttontest.obj \ $(OBJS)\test_gui_rearrangelisttest.obj \ $(OBJS)\test_gui_richtextctrltest.obj \ - $(OBJS)\test_gui_searchctrltest.obj \ + $(OBJS)\test_gui_searchctrltest.obj \ + $(OBJS)\test_gui_simplebooktest.obj \ $(OBJS)\test_gui_slidertest.obj \ $(OBJS)\test_gui_spinctrldbltest.obj \ $(OBJS)\test_gui_spinctrltest.obj \ @@ -217,20 +218,20 @@ TEST_GUI_OBJECTS = \ ### Conditionally set variables: ### -!if "$(TOOLKIT)" == "GTK" -WIN32_TOOLKIT_LOWERCASE = gtk -!endif -!if "$(TOOLKIT)" == "MSW" -WIN32_TOOLKIT_LOWERCASE = msw -!endif +!if "$(TOOLKIT)" == "GTK" +WIN32_TOOLKIT_LOWERCASE = gtk +!endif +!if "$(TOOLKIT)" == "MSW" +WIN32_TOOLKIT_LOWERCASE = msw +!endif !if "$(USE_GUI)" == "0" PORTNAME = base !endif !if "$(USE_GUI)" == "1" -PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) -!endif -!if "$(TOOLKIT)" == "MAC" -WXBASEPORT = _carbon +PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) +!endif +!if "$(TOOLKIT)" == "MAC" +WXBASEPORT = _carbon !endif !if "$(OFFICIAL_BUILD)" == "1" COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD @@ -259,11 +260,11 @@ EXTRALIBS_FOR_BASE = !if "$(MONOLITHIC)" == "1" EXTRALIBS_FOR_BASE = !endif -!if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2" -LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \ - gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \ - glib-2.0.lib -!endif +!if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2" +LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \ + gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \ + glib-2.0.lib +!endif !if "$(MONOLITHIC)" == "1" __LIB_PNG_IF_MONO_p = $(__LIB_PNG_p) !endif @@ -402,15 +403,15 @@ __DLLFLAG_p = -DWXUSINGDLL !endif !if "$(MONOLITHIC)" == "0" __WXLIB_NET_p = \ - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib !endif !if "$(MONOLITHIC)" == "0" __WXLIB_XML_p = \ - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = \ - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib !endif !if "$(MONOLITHIC)" == "1" __WXLIB_MONO_p = \ @@ -475,7 +476,7 @@ $(OBJS)\test.exe: $(OBJS)\test_dummy.obj $(TEST_OBJECTS) !if "$(USE_GUI)" == "1" $(OBJS)\test_gui.exe: $(OBJS)\test_gui_dummy.obj $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample.res ilink32 -Tpe -q -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) $(CPPUNIT_LIBS) -ap $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @&&| - c0x32.obj $(TEST_GUI_OBJECTS),$@,, $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\test_gui_sample.res + c0x32.obj $(TEST_GUI_OBJECTS),$@,, $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\test_gui_sample.res | !endif @@ -744,7 +745,7 @@ $(OBJS)\test_xmltest.obj: .\xml\xmltest.cpp $(CXX) -q -c -P -o$@ $(TEST_CXXFLAGS) .\xml\xmltest.cpp $(OBJS)\test_gui_sample.res: .\..\samples\sample.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) -i$(SETUPHDIR) -i.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_3_p) -i. $(__DLLFLAG_p_3) -i.\..\samples -dNOPCH .\..\samples\sample.rc + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) -i$(SETUPHDIR) -i.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_3_p) -i. $(__DLLFLAG_p_3) -i.\..\samples -dNOPCH .\..\samples\sample.rc $(OBJS)\test_gui_dummy.obj: .\dummy.cpp $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) -H .\dummy.cpp @@ -887,9 +888,12 @@ $(OBJS)\test_gui_rearrangelisttest.obj: .\controls\rearrangelisttest.cpp $(OBJS)\test_gui_richtextctrltest.obj: .\controls\richtextctrltest.cpp $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\richtextctrltest.cpp -$(OBJS)\test_gui_searchctrltest.obj: .\controls\searchctrltest.cpp - $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\searchctrltest.cpp - +$(OBJS)\test_gui_searchctrltest.obj: .\controls\searchctrltest.cpp + $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\searchctrltest.cpp + +$(OBJS)\test_gui_simplebooktest.obj: .\controls\simplebooktest.cpp + $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\simplebooktest.cpp + $(OBJS)\test_gui_slidertest.obj: .\controls\slidertest.cpp $(CXX) -q -c -P -o$@ $(TEST_GUI_CXXFLAGS) .\controls\slidertest.cpp diff --git a/tests/makefile.gcc b/tests/makefile.gcc index 7099a2f6fe..252a63a5c0 100644 --- a/tests/makefile.gcc +++ b/tests/makefile.gcc @@ -22,13 +22,13 @@ LIBDIRNAME = \ SETUPHDIR = \ $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) TEST_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ - -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ -I$(SETUPHDIR) -I.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -I. \ $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CPPUNIT_CFLAGS) $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) \ - $(CPPFLAGS) $(CXXFLAGS) + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) \ + $(CPPFLAGS) $(CXXFLAGS) TEST_OBJECTS = \ $(OBJS)\test_dummy.o \ $(OBJS)\test_test.o \ @@ -115,13 +115,13 @@ TEST_OBJECTS = \ $(OBJS)\test_xlocale.o \ $(OBJS)\test_xmltest.o TEST_GUI_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ - $(GCCFLAGS) -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -I. $(__DLLFLAG_p) -I.\..\samples \ -DNOPCH $(CPPUNIT_CFLAGS) $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ - -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) $(CPPFLAGS) $(CXXFLAGS) + -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) $(CPPFLAGS) $(CXXFLAGS) TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_sample_rc.o \ $(OBJS)\test_gui_dummy.o \ @@ -171,7 +171,8 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_radiobuttontest.o \ $(OBJS)\test_gui_rearrangelisttest.o \ $(OBJS)\test_gui_richtextctrltest.o \ - $(OBJS)\test_gui_searchctrltest.o \ + $(OBJS)\test_gui_searchctrltest.o \ + $(OBJS)\test_gui_simplebooktest.o \ $(OBJS)\test_gui_slidertest.o \ $(OBJS)\test_gui_spinctrldbltest.o \ $(OBJS)\test_gui_spinctrltest.o \ @@ -211,12 +212,12 @@ TEST_GUI_OBJECTS = \ ### Conditionally set variables: ### -ifeq ($(TOOLKIT),GTK) -WIN32_TOOLKIT_LOWERCASE = gtk -endif -ifeq ($(TOOLKIT),MSW) -WIN32_TOOLKIT_LOWERCASE = msw -endif +ifeq ($(TOOLKIT),GTK) +WIN32_TOOLKIT_LOWERCASE = gtk +endif +ifeq ($(TOOLKIT),MSW) +WIN32_TOOLKIT_LOWERCASE = msw +endif ifeq ($(GCC_VERSION),2.95) GCCFLAGS = -fvtable-thunks endif @@ -224,10 +225,10 @@ ifeq ($(USE_GUI),0) PORTNAME = base endif ifeq ($(USE_GUI),1) -PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) -endif -ifeq ($(TOOLKIT),MAC) -WXBASEPORT = _carbon +PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) +endif +ifeq ($(TOOLKIT),MAC) +WXBASEPORT = _carbon endif ifeq ($(OFFICIAL_BUILD),1) COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD @@ -256,16 +257,16 @@ endif ifeq ($(MONOLITHIC),1) EXTRALIBS_FOR_BASE = endif -ifeq ($(TOOLKIT),GTK) -CXXFLAGS_GTK_WINDOWS_GCC = -mms-bitfields -endif -ifeq ($(TOOLKIT),GTK) -ifeq ($(TOOLKIT_VERSION),2) -LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \ - gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \ - glib-2.0.lib -endif -endif +ifeq ($(TOOLKIT),GTK) +CXXFLAGS_GTK_WINDOWS_GCC = -mms-bitfields +endif +ifeq ($(TOOLKIT),GTK) +ifeq ($(TOOLKIT_VERSION),2) +LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \ + gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \ + glib-2.0.lib +endif +endif ifeq ($(MONOLITHIC),1) __LIB_PNG_IF_MONO_p = $(__LIB_PNG_p) endif @@ -396,15 +397,15 @@ __DLLFLAG_p = -DWXUSINGDLL endif ifeq ($(MONOLITHIC),0) __WXLIB_NET_p = \ - -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net + -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net endif ifeq ($(MONOLITHIC),0) __WXLIB_XML_p = \ - -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml + -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml endif ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = \ - -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) + -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) endif ifeq ($(MONOLITHIC),1) __WXLIB_MONO_p = \ @@ -465,7 +466,7 @@ $(OBJS)\test.exe: $(TEST_OBJECTS) ifeq ($(USE_GUI),1) $(OBJS)\test_gui.exe: $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample_rc.o - $(CXX) -o $@ $(TEST_GUI_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(CPPUNIT_LIBS) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet + $(CXX) -o $@ $(TEST_GUI_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(CPPUNIT_LIBS) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet endif data: @@ -733,7 +734,7 @@ $(OBJS)\test_xmltest.o: ./xml/xmltest.cpp $(CXX) -c -o $@ $(TEST_CXXFLAGS) $(CPPDEPS) $< $(OBJS)\test_gui_sample_rc.o: ./../samples/sample.rc - windres --use-temp-file -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) --include-dir $(SETUPHDIR) --include-dir ./../include $(__CAIRO_INCLUDEDIR_p_1) --include-dir . $(__DLLFLAG_p_3) --include-dir ./../samples --define NOPCH + windres --use-temp-file -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) --include-dir $(SETUPHDIR) --include-dir ./../include $(__CAIRO_INCLUDEDIR_p_1) --include-dir . $(__DLLFLAG_p_3) --include-dir ./../samples --define NOPCH $(OBJS)\test_gui_dummy.o: ./dummy.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< @@ -876,9 +877,12 @@ $(OBJS)\test_gui_rearrangelisttest.o: ./controls/rearrangelisttest.cpp $(OBJS)\test_gui_richtextctrltest.o: ./controls/richtextctrltest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< -$(OBJS)\test_gui_searchctrltest.o: ./controls/searchctrltest.cpp - $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< - +$(OBJS)\test_gui_searchctrltest.o: ./controls/searchctrltest.cpp + $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\test_gui_simplebooktest.o: ./controls/simplebooktest.cpp + $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\test_gui_slidertest.o: ./controls/slidertest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< diff --git a/tests/makefile.vc b/tests/makefile.vc index 556730068b..5890b203a1 100644 --- a/tests/makefile.vc +++ b/tests/makefile.vc @@ -23,7 +23,7 @@ SETUPHDIR = \ TEST_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME) /DWIN32 $(__DEBUGINFO) \ /Fd$(OBJS)\test.pdb $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) \ /D_CRT_SECURE_NO_DEPRECATE=1 /D_CRT_NON_CONFORMING_SWPRINTFS=1 \ - /D_SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p) /D__WX$(TOOLKIT)__ \ + /D_SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p) /D__WX$(TOOLKIT)__ \ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \ $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) /I$(SETUPHDIR) /I.\..\include \ @@ -119,13 +119,13 @@ TEST_GUI_CXXFLAGS = /M$(__RUNTIME_LIBS_27)$(__DEBUGRUNTIME) /DWIN32 \ $(__DEBUGINFO) /Fd$(OBJS)\test_gui.pdb $(____DEBUGRUNTIME) \ $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \ /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ - $(__NO_VC_CRTDBG_p) /D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ - $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ - $(__MSLU_DEFINE_p) /I$(SETUPHDIR) /I.\..\include \ - $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /I. $(__DLLFLAG_p) /I.\..\samples \ - /DNOPCH $(CPPUNIT_CFLAGS) /D_CONSOLE $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ - /Yu"testprec.h" /Fp"$(OBJS)\testprec_test_gui.pch" $(CPPFLAGS) $(CXXFLAGS) + $(__NO_VC_CRTDBG_p) /D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ + $(__MSLU_DEFINE_p) /I$(SETUPHDIR) /I.\..\include \ + $(____CAIRO_INCLUDEDIR_FILENAMES) /W4 /I. $(__DLLFLAG_p) /I.\..\samples \ + /DNOPCH $(CPPUNIT_CFLAGS) /D_CONSOLE $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + /Yu"testprec.h" /Fp"$(OBJS)\testprec_test_gui.pch" $(CPPFLAGS) $(CXXFLAGS) TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_dummy.obj \ $(OBJS)\test_gui_asserthelper.obj \ @@ -174,7 +174,8 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_radiobuttontest.obj \ $(OBJS)\test_gui_rearrangelisttest.obj \ $(OBJS)\test_gui_richtextctrltest.obj \ - $(OBJS)\test_gui_searchctrltest.obj \ + $(OBJS)\test_gui_searchctrltest.obj \ + $(OBJS)\test_gui_simplebooktest.obj \ $(OBJS)\test_gui_slidertest.obj \ $(OBJS)\test_gui_spinctrldbltest.obj \ $(OBJS)\test_gui_spinctrltest.obj \ @@ -216,12 +217,12 @@ TEST_GUI_RESOURCES = \ ### Conditionally set variables: ### -!if "$(TOOLKIT)" == "GTK" -WIN32_TOOLKIT_LOWERCASE = gtk -!endif -!if "$(TOOLKIT)" == "MSW" -WIN32_TOOLKIT_LOWERCASE = msw -!endif +!if "$(TOOLKIT)" == "GTK" +WIN32_TOOLKIT_LOWERCASE = gtk +!endif +!if "$(TOOLKIT)" == "MSW" +WIN32_TOOLKIT_LOWERCASE = msw +!endif !if "$(TARGET_CPU)" == "AMD64" ARCH_SUFFIX = _x64 !endif @@ -244,10 +245,10 @@ ARCH_SUFFIX = _x64 PORTNAME = base !endif !if "$(USE_GUI)" == "1" -PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) -!endif -!if "$(TOOLKIT)" == "MAC" -WXBASEPORT = _carbon +PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) +!endif +!if "$(TOOLKIT)" == "MAC" +WXBASEPORT = _carbon !endif !if "$(OFFICIAL_BUILD)" == "1" COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD @@ -297,11 +298,11 @@ EXTRALIBS_FOR_BASE = !if "$(MONOLITHIC)" == "1" EXTRALIBS_FOR_BASE = !endif -!if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2" -LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \ - gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \ - glib-2.0.lib -!endif +!if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2" +LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \ + gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \ + glib-2.0.lib +!endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" __DEBUGINFO_2 = $(__DEBUGRUNTIME_0) !endif @@ -560,15 +561,15 @@ __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(MONOLITHIC)" == "0" __WXLIB_NET_p = \ - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib !endif !if "$(MONOLITHIC)" == "0" __WXLIB_XML_p = \ - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = \ - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib !endif !if "$(MONOLITHIC)" == "1" __WXLIB_MONO_p = \ @@ -615,7 +616,7 @@ $(OBJS)\test.exe: $(OBJS)\test_dummy.obj $(TEST_OBJECTS) !if "$(USE_GUI)" == "1" $(OBJS)\test_gui.exe: $(OBJS)\test_gui_dummy.obj $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample.res link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\test_gui.pdb" $(__DEBUGINFO_19) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(CPPUNIT_LIBS) /SUBSYSTEM:CONSOLE $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @<< - $(TEST_GUI_OBJECTS) $(TEST_GUI_RESOURCES) $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib + $(TEST_GUI_OBJECTS) $(TEST_GUI_RESOURCES) $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib << !endif @@ -887,7 +888,7 @@ $(OBJS)\test_gui_dummy.obj: .\dummy.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) /Yctestprec.h .\dummy.cpp $(OBJS)\test_gui_sample.res: .\..\samples\sample.rc - rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_20_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_3) /d __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) /i $(SETUPHDIR) /i .\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_3_p) /i . $(__DLLFLAG_p_3) /i .\..\samples /d NOPCH /d _CONSOLE .\..\samples\sample.rc + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_20_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_3) /d __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) /i $(SETUPHDIR) /i .\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_3_p) /i . $(__DLLFLAG_p_3) /i .\..\samples /d NOPCH /d _CONSOLE .\..\samples\sample.rc $(OBJS)\test_gui_asserthelper.obj: .\asserthelper.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\asserthelper.cpp @@ -1027,9 +1028,12 @@ $(OBJS)\test_gui_rearrangelisttest.obj: .\controls\rearrangelisttest.cpp $(OBJS)\test_gui_richtextctrltest.obj: .\controls\richtextctrltest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\richtextctrltest.cpp -$(OBJS)\test_gui_searchctrltest.obj: .\controls\searchctrltest.cpp - $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\searchctrltest.cpp - +$(OBJS)\test_gui_searchctrltest.obj: .\controls\searchctrltest.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\searchctrltest.cpp + +$(OBJS)\test_gui_simplebooktest.obj: .\controls\simplebooktest.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\simplebooktest.cpp + $(OBJS)\test_gui_slidertest.obj: .\controls\slidertest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\controls\slidertest.cpp diff --git a/tests/makefile.wat b/tests/makefile.wat index 9c45253af6..8c4d53fdb5 100644 --- a/tests/makefile.wat +++ b/tests/makefile.wat @@ -31,23 +31,23 @@ WATCOM_CWD = $+ $(%cdrive):$(%cwd) $- ### Conditionally set variables: ### -WIN32_TOOLKIT_LOWERCASE = -!ifeq TOOLKIT GTK -WIN32_TOOLKIT_LOWERCASE = gtk -!endif -!ifeq TOOLKIT MSW -WIN32_TOOLKIT_LOWERCASE = msw -!endif +WIN32_TOOLKIT_LOWERCASE = +!ifeq TOOLKIT GTK +WIN32_TOOLKIT_LOWERCASE = gtk +!endif +!ifeq TOOLKIT MSW +WIN32_TOOLKIT_LOWERCASE = msw +!endif PORTNAME = !ifeq USE_GUI 0 PORTNAME = base !endif !ifeq USE_GUI 1 -PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) -!endif -WXBASEPORT = -!ifeq TOOLKIT MAC -WXBASEPORT = _carbon +PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) +!endif +WXBASEPORT = +!ifeq TOOLKIT MAC +WXBASEPORT = _carbon !endif COMPILER_VERSION = !ifeq OFFICIAL_BUILD 1 @@ -83,14 +83,14 @@ EXTRALIBS_FOR_BASE = !ifeq MONOLITHIC 1 EXTRALIBS_FOR_BASE = !endif -LIB_GTK = -!ifeq TOOLKIT GTK -!ifeq TOOLKIT_VERSION 2 -LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib & - gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib & - glib-2.0.lib -!endif -!endif +LIB_GTK = +!ifeq TOOLKIT GTK +!ifeq TOOLKIT_VERSION 2 +LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib & + gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib & + glib-2.0.lib +!endif +!endif __LIB_PNG_IF_MONO_p = !ifeq MONOLITHIC 1 __LIB_PNG_IF_MONO_p = $(__LIB_PNG_p) @@ -218,17 +218,17 @@ __EXCEPTIONSFLAG = -xs __WXLIB_NET_p = !ifeq MONOLITHIC 0 __WXLIB_NET_p = & - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib !endif __WXLIB_XML_p = !ifeq MONOLITHIC 0 __WXLIB_XML_p = & - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml.lib !endif __WXLIB_BASE_p = !ifeq MONOLITHIC 0 __WXLIB_BASE_p = & - wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib + wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 @@ -298,13 +298,13 @@ LIBDIRNAME = & SETUPHDIR = & $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) TEST_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & - $(__RUNTIME_LIBS) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) & - $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) & - $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) & - -i=$(SETUPHDIR) -i=.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx & - -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -dwxUSE_GUI=0 & - $(CPPUNIT_CFLAGS) /fh=$(OBJS)\testprec_test.pch $(__RTTIFLAG) & - $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) + $(__RUNTIME_LIBS) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) & + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) & + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) & + -i=$(SETUPHDIR) -i=.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx & + -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -dwxUSE_GUI=0 & + $(CPPUNIT_CFLAGS) /fh=$(OBJS)\testprec_test.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) TEST_OBJECTS = & $(OBJS)\test_dummy.obj & $(OBJS)\test_test.obj & @@ -391,13 +391,13 @@ TEST_OBJECTS = & $(OBJS)\test_xlocale.obj & $(OBJS)\test_xmltest.obj TEST_GUI_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & - $(__RUNTIME_LIBS) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) & - $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) & - $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) & - -i=$(SETUPHDIR) -i=.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx & - -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\samples -dNOPCH & - $(CPPUNIT_CFLAGS) /fh=$(OBJS)\testprec_test_gui.pch $(__RTTIFLAG) & - $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) + $(__RUNTIME_LIBS) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) & + $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) & + $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) & + -i=$(SETUPHDIR) -i=.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx & + -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\samples -dNOPCH & + $(CPPUNIT_CFLAGS) /fh=$(OBJS)\testprec_test_gui.pch $(__RTTIFLAG) & + $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) TEST_GUI_OBJECTS = & $(OBJS)\test_gui_dummy.obj & $(OBJS)\test_gui_asserthelper.obj & @@ -446,7 +446,8 @@ TEST_GUI_OBJECTS = & $(OBJS)\test_gui_radiobuttontest.obj & $(OBJS)\test_gui_rearrangelisttest.obj & $(OBJS)\test_gui_richtextctrltest.obj & - $(OBJS)\test_gui_searchctrltest.obj & + $(OBJS)\test_gui_searchctrltest.obj & + $(OBJS)\test_gui_simplebooktest.obj & $(OBJS)\test_gui_slidertest.obj & $(OBJS)\test_gui_spinctrldbltest.obj & $(OBJS)\test_gui_spinctrltest.obj & @@ -522,7 +523,7 @@ $(OBJS)\test_gui.exe : $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample.res @%append $(OBJS)\test_gui.lbc option caseexact @%append $(OBJS)\test_gui.lbc $(__DEBUGINFO_1) libpath $(LIBDIRNAME) $(CPPUNIT_LIBS) system nt ref 'main_' $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) @for %i in ($(TEST_GUI_OBJECTS)) do @%append $(OBJS)\test_gui.lbc file %i - @for %i in ( $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\test_gui.lbc library %i + @for %i in ( $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\test_gui.lbc library %i @%append $(OBJS)\test_gui.lbc option resource=$(OBJS)\test_gui_sample.res @for %i in () do @%append $(OBJS)\test_gui.lbc option stack=%i wlink @$(OBJS)\test_gui.lbc @@ -793,7 +794,7 @@ $(OBJS)\test_xmltest.obj : .AUTODEPEND .\xml\xmltest.cpp $(CXX) -bt=nt -zq -fo=$^@ $(TEST_CXXFLAGS) $< $(OBJS)\test_gui_sample.res : .AUTODEPEND .\..\samples\sample.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -i=. $(__DLLFLAG_p) -i=.\..\samples -dNOPCH $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -i=. $(__DLLFLAG_p) -i=.\..\samples -dNOPCH $< $(OBJS)\test_gui_dummy.obj : .AUTODEPEND .\dummy.cpp $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< @@ -936,9 +937,12 @@ $(OBJS)\test_gui_rearrangelisttest.obj : .AUTODEPEND .\controls\rearrangelistte $(OBJS)\test_gui_richtextctrltest.obj : .AUTODEPEND .\controls\richtextctrltest.cpp $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< -$(OBJS)\test_gui_searchctrltest.obj : .AUTODEPEND .\controls\searchctrltest.cpp - $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< - +$(OBJS)\test_gui_searchctrltest.obj : .AUTODEPEND .\controls\searchctrltest.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< + +$(OBJS)\test_gui_simplebooktest.obj : .AUTODEPEND .\controls\simplebooktest.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< + $(OBJS)\test_gui_slidertest.obj : .AUTODEPEND .\controls\slidertest.cpp $(CXX) -bt=nt -zq -fo=$^@ $(TEST_GUI_CXXFLAGS) $< diff --git a/tests/test.bkl b/tests/test.bkl index 0c142a3409..cedfbe8c58 100644 --- a/tests/test.bkl +++ b/tests/test.bkl @@ -173,6 +173,7 @@ controls/rearrangelisttest.cpp controls/richtextctrltest.cpp controls/searchctrltest.cpp + controls/simplebooktest.cpp controls/slidertest.cpp controls/spinctrldbltest.cpp controls/spinctrltest.cpp diff --git a/tests/test_test.dsp b/tests/test_test.dsp index 83221d35c6..f1e68bec39 100644 --- a/tests/test_test.dsp +++ b/tests/test_test.dsp @@ -30,7 +30,7 @@ CFG=test - Win32 Debug CPP=cl.exe RSC=rc.exe -!IF "$(CFG)" == "test - Win32 DLL Release" +!IF "$(CFG)" == "test - Win32 DLL Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 diff --git a/tests/test_test_gui.dsp b/tests/test_test_gui.dsp index 8e1fd8e6f4..2569507311 100644 --- a/tests/test_test_gui.dsp +++ b/tests/test_test_gui.dsp @@ -30,7 +30,7 @@ CFG=test_gui - Win32 Debug CPP=cl.exe RSC=rc.exe -!IF "$(CFG)" == "test_gui - Win32 DLL Release" +!IF "$(CFG)" == "test_gui - Win32 DLL Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 @@ -377,10 +377,10 @@ SOURCE=.\..\samples\sample.rc # End Source File # Begin Source File -SOURCE=.\controls\searchctrltest.cpp -# End Source File -# Begin Source File - +SOURCE=.\controls\searchctrltest.cpp +# End Source File +# Begin Source File + SOURCE=.\misc\selstoretest.cpp # End Source File # Begin Source File @@ -393,6 +393,10 @@ SOURCE=.\misc\settings.cpp # End Source File # Begin Source File +SOURCE=.\controls\simplebooktest.cpp +# End Source File +# Begin Source File + SOURCE=.\geometry\size.cpp # End Source File # Begin Source File diff --git a/tests/test_vc7_test_gui.vcproj b/tests/test_vc7_test_gui.vcproj index 4ca680277a..f3345afef8 100644 --- a/tests/test_vc7_test_gui.vcproj +++ b/tests/test_vc7_test_gui.vcproj @@ -508,6 +508,9 @@ + + diff --git a/tests/test_vc8_test_gui.vcproj b/tests/test_vc8_test_gui.vcproj index fcbfece1bc..a4bd5961b8 100644 --- a/tests/test_vc8_test_gui.vcproj +++ b/tests/test_vc8_test_gui.vcproj @@ -713,6 +713,10 @@ RelativePath=".\misc\settings.cpp" > + + diff --git a/tests/test_vc9_test_gui.vcproj b/tests/test_vc9_test_gui.vcproj index b62262a860..746fd5d0a2 100644 --- a/tests/test_vc9_test_gui.vcproj +++ b/tests/test_vc9_test_gui.vcproj @@ -699,6 +699,10 @@ RelativePath=".\misc\settings.cpp" > + + -- 2.45.2