wxWidgets/samples/makefile.gcc
Vadim Zeitlin e70fc11ef1 Replace CppUnit with Catch for unit tests
Drop the legacy CppUnit testing framework used for the unit tests.
Replacing it with Catch has the advantage of not requiring CppUnit
libraries to be installed on the system in order to be able to run
tests (Catch is header-only and a copy of it is now included in the
main repository itself) and, in the future, of being able to write
the tests in a much more natural way.

For now, however, avoid changing the existing tests code as much as
[reasonably] possible to avoid introducing bugs in them and provide
the CppUnit compatibility macros in the new wx/catch_cppunit.h header
which allow to preserve the 99% of the existing code unchanged. Some
of the required changes are:

 - Decompose asserts using "a && b" conditions into multiple asserts
   checking "a" and "b" independently. This would have been better
   even with CppUnit (to know which part of condition exactly failed)
   and is required with Catch.

 - Use extra parentheses around such conditions when they can't be
   easily decomposed in the arrays test, due to the use of macros.
   This is not ideal from the point of view of messages given when
   the tests fail but will do for now.

 - Rewrite asserts using "a || b" as a combination of condition
   checks and assert macros. Again, this is better anyhow, and is
   required with Catch. Incidentally, this allowed to fix a bug in
   the "exec" unit test which didn't leave enough time for the new
   process to be launched before trying to kill it.

 - Remove multiple CPPUNIT_TEST_SUITE_NAMED_REGISTRATION() macros,
   our emulation of this macro can be used only once.

 - Provide string conversions using Catch-specific StringMaker for
   a couple of types.

 - Replace custom wxImage comparison with a Catch-specific matcher
   class.

 - Remove most of test running logic from test.cpp, in particular don't
   parse command line ourselves any longer but use Catch built-in
   command line parser. This is a source of a minor regression:
   previously, both "Foo" and "FooTestCase" could be used as the name of
   the test to run, but now only the latter is accepted.
2017-11-02 01:53:16 +01:00

457 lines
14 KiB
Plaintext

# =========================================================================
# This makefile was generated by
# Bakefile 0.2.11 (http://www.bakefile.org)
# Do not modify, all changes will be overwritten!
# =========================================================================
include ../build/msw/config.gcc
# -------------------------------------------------------------------------
# Do not modify the rest of this file!
# -------------------------------------------------------------------------
### Variables: ###
MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
LINK_MODULE_FLAGS="$(LINK_MODULE_FLAGS)" CC="$(CC)" CXX="$(CXX)" \
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
LDFLAGS="$(LDFLAGS)" CPP="$(CPP)" SHARED="$(SHARED)" \
TOOLKIT_VERSION="$(TOOLKIT_VERSION)" WXUNIV="$(WXUNIV)" \
UNICODE="$(UNICODE)" BUILD="$(BUILD)" DEBUG_INFO="$(DEBUG_INFO)" \
DEBUG_FLAG="$(DEBUG_FLAG)" MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" \
USE_HTML="$(USE_HTML)" USE_WEBVIEW="$(USE_WEBVIEW)" \
USE_MEDIA="$(USE_MEDIA)" USE_XRC="$(USE_XRC)" USE_AUI="$(USE_AUI)" \
USE_RIBBON="$(USE_RIBBON)" USE_PROPGRID="$(USE_PROPGRID)" \
USE_RICHTEXT="$(USE_RICHTEXT)" USE_STC="$(USE_STC)" \
USE_OPENGL="$(USE_OPENGL)" USE_QA="$(USE_QA)" \
USE_EXCEPTIONS="$(USE_EXCEPTIONS)" USE_RTTI="$(USE_RTTI)" \
USE_THREADS="$(USE_THREADS)" USE_CAIRO="$(USE_CAIRO)" \
OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" \
WX_FLAVOUR="$(WX_FLAVOUR)" WX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" CFG="$(CFG)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)" GCC_VERSION="$(GCC_VERSION)" \
WINDRES="$(WINDRES)"
### Conditionally set variables: ###
ifeq ($(USE_HTML),1)
__aui___depname = aui
endif
ifeq ($(USE_EXCEPTIONS),1)
__except___depname = except
endif
ifeq ($(USE_HTML),1)
__help___depname = help
endif
ifeq ($(USE_HTML),1)
__htlbox___depname = htlbox
endif
ifeq ($(USE_HTML),1)
__html___depname = html
endif
ifeq ($(USE_MEDIA),1)
__mediaplayer___depname = mediaplayer
endif
ifeq ($(USE_PROPGRID),1)
__propgrid___depname = propgrid
endif
ifeq ($(USE_RIBBON),1)
__ribbon___depname = ribbon
endif
ifeq ($(USE_HTML),1)
ifeq ($(USE_RICHTEXT),1)
__richtext___depname = richtext
endif
endif
ifeq ($(USE_MEDIA),1)
__splash___depname = splash
endif
ifeq ($(USE_STC),1)
__stc___depname = stc
endif
ifeq ($(USE_STC),1)
__webview___depname = webview
endif
ifeq ($(USE_HTML),1)
ifeq ($(USE_RIBBON),1)
__xrc___depname = xrc
endif
endif
### Targets: ###
all: access animate artprov $(__aui___depname) calendar caret clipboard collpane combo config console dataview dialogs dialup display dll dnd docview dragimag drawing erase event $(__except___depname) exec font grid $(__help___depname) $(__htlbox___depname) $(__html___depname) image internat ipc joytest keyboard layout listctrl mdi $(__mediaplayer___depname) menu minimal nativdlg notebook oleauto opengl ownerdrw popup power preferences printing $(__propgrid___depname) regtest render $(__ribbon___depname) $(__richtext___depname) sashtest scroll secretstore shaped sockets sound $(__splash___depname) splitter statbar $(__stc___depname) svg taborder taskbar text thread toolbar treectrl typetest uiaction validate vscroll $(__webview___depname) widgets wizard wrapsizer $(__xrc___depname)
clean:
-if exist .\*.o del .\*.o
-if exist .\*.d del .\*.d
$(MAKE) -C access -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C animate -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C artprov -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C aui -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C calendar -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C caret -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C clipboard -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C collpane -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C combo -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C config -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C console -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C dataview -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C dialogs -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C dialup -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C display -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C dll -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C dnd -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C docview -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C dragimag -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C drawing -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C erase -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C event -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C except -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C exec -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C font -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C grid -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C help -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C htlbox -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C html -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C image -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C internat -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C ipc -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C joytest -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C keyboard -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C layout -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C listctrl -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C mdi -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C mediaplayer -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C menu -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C minimal -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C nativdlg -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C notebook -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C oleauto -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C opengl -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C ownerdrw -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C popup -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C power -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C preferences -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C printing -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C propgrid -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C regtest -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C render -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C ribbon -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C richtext -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C sashtest -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C scroll -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C secretstore -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C shaped -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C sockets -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C sound -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C splash -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C splitter -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C statbar -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C stc -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C svg -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C taborder -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C taskbar -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C text -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C thread -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C toolbar -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C treectrl -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C typetest -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C uiaction -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C validate -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C vscroll -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C webview -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C widgets -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C wizard -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C wrapsizer -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C xrc -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C memcheck -f makefile.gcc $(MAKEARGS) clean
access:
$(MAKE) -C access -f makefile.gcc $(MAKEARGS) all
animate:
$(MAKE) -C animate -f makefile.gcc $(MAKEARGS) all
artprov:
$(MAKE) -C artprov -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_HTML),1)
aui:
$(MAKE) -C aui -f makefile.gcc $(MAKEARGS) all
endif
calendar:
$(MAKE) -C calendar -f makefile.gcc $(MAKEARGS) all
caret:
$(MAKE) -C caret -f makefile.gcc $(MAKEARGS) all
clipboard:
$(MAKE) -C clipboard -f makefile.gcc $(MAKEARGS) all
collpane:
$(MAKE) -C collpane -f makefile.gcc $(MAKEARGS) all
combo:
$(MAKE) -C combo -f makefile.gcc $(MAKEARGS) all
config:
$(MAKE) -C config -f makefile.gcc $(MAKEARGS) all
console:
$(MAKE) -C console -f makefile.gcc $(MAKEARGS) all
dataview:
$(MAKE) -C dataview -f makefile.gcc $(MAKEARGS) all
dialogs:
$(MAKE) -C dialogs -f makefile.gcc $(MAKEARGS) all
dialup:
$(MAKE) -C dialup -f makefile.gcc $(MAKEARGS) all
display:
$(MAKE) -C display -f makefile.gcc $(MAKEARGS) all
dll:
$(MAKE) -C dll -f makefile.gcc $(MAKEARGS) all
dnd:
$(MAKE) -C dnd -f makefile.gcc $(MAKEARGS) all
docview:
$(MAKE) -C docview -f makefile.gcc $(MAKEARGS) all
dragimag:
$(MAKE) -C dragimag -f makefile.gcc $(MAKEARGS) all
drawing:
$(MAKE) -C drawing -f makefile.gcc $(MAKEARGS) all
erase:
$(MAKE) -C erase -f makefile.gcc $(MAKEARGS) all
event:
$(MAKE) -C event -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_EXCEPTIONS),1)
except:
$(MAKE) -C except -f makefile.gcc $(MAKEARGS) all
endif
exec:
$(MAKE) -C exec -f makefile.gcc $(MAKEARGS) all
font:
$(MAKE) -C font -f makefile.gcc $(MAKEARGS) all
grid:
$(MAKE) -C grid -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_HTML),1)
help:
$(MAKE) -C help -f makefile.gcc $(MAKEARGS) all
endif
ifeq ($(USE_HTML),1)
htlbox:
$(MAKE) -C htlbox -f makefile.gcc $(MAKEARGS) all
endif
ifeq ($(USE_HTML),1)
html:
$(MAKE) -C html -f makefile.gcc $(MAKEARGS) all
endif
image:
$(MAKE) -C image -f makefile.gcc $(MAKEARGS) all
internat:
$(MAKE) -C internat -f makefile.gcc $(MAKEARGS) all
ipc:
$(MAKE) -C ipc -f makefile.gcc $(MAKEARGS) all
joytest:
$(MAKE) -C joytest -f makefile.gcc $(MAKEARGS) all
keyboard:
$(MAKE) -C keyboard -f makefile.gcc $(MAKEARGS) all
layout:
$(MAKE) -C layout -f makefile.gcc $(MAKEARGS) all
listctrl:
$(MAKE) -C listctrl -f makefile.gcc $(MAKEARGS) all
mdi:
$(MAKE) -C mdi -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_MEDIA),1)
mediaplayer:
$(MAKE) -C mediaplayer -f makefile.gcc $(MAKEARGS) all
endif
menu:
$(MAKE) -C menu -f makefile.gcc $(MAKEARGS) all
minimal:
$(MAKE) -C minimal -f makefile.gcc $(MAKEARGS) all
nativdlg:
$(MAKE) -C nativdlg -f makefile.gcc $(MAKEARGS) all
notebook:
$(MAKE) -C notebook -f makefile.gcc $(MAKEARGS) all
oleauto:
$(MAKE) -C oleauto -f makefile.gcc $(MAKEARGS) all
opengl:
$(MAKE) -C opengl -f makefile.gcc $(MAKEARGS) all
ownerdrw:
$(MAKE) -C ownerdrw -f makefile.gcc $(MAKEARGS) all
popup:
$(MAKE) -C popup -f makefile.gcc $(MAKEARGS) all
power:
$(MAKE) -C power -f makefile.gcc $(MAKEARGS) all
preferences:
$(MAKE) -C preferences -f makefile.gcc $(MAKEARGS) all
printing:
$(MAKE) -C printing -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_PROPGRID),1)
propgrid:
$(MAKE) -C propgrid -f makefile.gcc $(MAKEARGS) all
endif
regtest:
$(MAKE) -C regtest -f makefile.gcc $(MAKEARGS) all
render:
$(MAKE) -C render -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_RIBBON),1)
ribbon:
$(MAKE) -C ribbon -f makefile.gcc $(MAKEARGS) all
endif
ifeq ($(USE_HTML),1)
ifeq ($(USE_RICHTEXT),1)
richtext:
$(MAKE) -C richtext -f makefile.gcc $(MAKEARGS) all
endif
endif
sashtest:
$(MAKE) -C sashtest -f makefile.gcc $(MAKEARGS) all
scroll:
$(MAKE) -C scroll -f makefile.gcc $(MAKEARGS) all
secretstore:
$(MAKE) -C secretstore -f makefile.gcc $(MAKEARGS) all
shaped:
$(MAKE) -C shaped -f makefile.gcc $(MAKEARGS) all
sockets:
$(MAKE) -C sockets -f makefile.gcc $(MAKEARGS) all
sound:
$(MAKE) -C sound -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_MEDIA),1)
splash:
$(MAKE) -C splash -f makefile.gcc $(MAKEARGS) all
endif
splitter:
$(MAKE) -C splitter -f makefile.gcc $(MAKEARGS) all
statbar:
$(MAKE) -C statbar -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_STC),1)
stc:
$(MAKE) -C stc -f makefile.gcc $(MAKEARGS) all
endif
svg:
$(MAKE) -C svg -f makefile.gcc $(MAKEARGS) all
taborder:
$(MAKE) -C taborder -f makefile.gcc $(MAKEARGS) all
taskbar:
$(MAKE) -C taskbar -f makefile.gcc $(MAKEARGS) all
text:
$(MAKE) -C text -f makefile.gcc $(MAKEARGS) all
thread:
$(MAKE) -C thread -f makefile.gcc $(MAKEARGS) all
toolbar:
$(MAKE) -C toolbar -f makefile.gcc $(MAKEARGS) all
treectrl:
$(MAKE) -C treectrl -f makefile.gcc $(MAKEARGS) all
typetest:
$(MAKE) -C typetest -f makefile.gcc $(MAKEARGS) all
uiaction:
$(MAKE) -C uiaction -f makefile.gcc $(MAKEARGS) all
validate:
$(MAKE) -C validate -f makefile.gcc $(MAKEARGS) all
vscroll:
$(MAKE) -C vscroll -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_STC),1)
webview:
$(MAKE) -C webview -f makefile.gcc $(MAKEARGS) all
endif
widgets:
$(MAKE) -C widgets -f makefile.gcc $(MAKEARGS) all
wizard:
$(MAKE) -C wizard -f makefile.gcc $(MAKEARGS) all
wrapsizer:
$(MAKE) -C wrapsizer -f makefile.gcc $(MAKEARGS) all
ifeq ($(USE_HTML),1)
ifeq ($(USE_RIBBON),1)
xrc:
$(MAKE) -C xrc -f makefile.gcc $(MAKEARGS) all
endif
endif
memcheck:
$(MAKE) -C memcheck -f makefile.gcc $(MAKEARGS) all
.PHONY: all clean access animate artprov aui calendar caret clipboard collpane combo \
config console dataview dialogs dialup display dll dnd docview dragimag drawing \
erase event except exec font grid help htlbox html image internat ipc joytest \
keyboard layout listctrl mdi mediaplayer menu minimal nativdlg notebook oleauto \
opengl ownerdrw popup power preferences printing propgrid regtest render ribbon \
richtext sashtest scroll secretstore shaped sockets sound splash splitter statbar \
stc svg taborder taskbar text thread toolbar treectrl typetest uiaction validate \
vscroll webview widgets wizard wrapsizer xrc memcheck
SHELL := $(COMSPEC)
# Dependencies tracking:
-include ./*.d