wxWidgets/samples
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
..
access Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
animate Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
artprov Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
aui Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
calendar Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
caret Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
clipboard Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
collpane Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
combo Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
config Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
console Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
dataview Merge branch 'remove-mac-res' 2017-10-21 22:11:42 +02:00
debugrpt Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
dialogs Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
dialup Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
display Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
dll Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
dnd Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
docview Remove old Carbon Mac resource files themselves 2017-10-21 17:49:34 +02:00
dragimag Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
drawing Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
erase Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
event Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
except Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
exec Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
flash Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
font Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
fswatcher Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
grid Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
help Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
htlbox Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
html Replace CppUnit with Catch for unit tests 2017-11-02 01:53:16 +01:00
image Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
internat Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
ipc Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
joytest Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
keyboard Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
layout Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
listctrl Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
mdi Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
mediaplayer Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
memcheck Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
menu Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
mfc Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
minimal Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
nativdlg Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
notebook Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
oleauto Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
opengl Replace CppUnit with Catch for unit tests 2017-11-02 01:53:16 +01:00
ownerdrw Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
popup Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
power Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
preferences Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
printing Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
propgrid Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
regtest Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
render Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
ribbon Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
richtext Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
sashtest Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
scroll Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
secretstore Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
shaped Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
sockets Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
sound Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
splash Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
splitter Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
statbar Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
stc Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
svg Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
taborder Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
taskbar Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
taskbarbutton Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
text Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
thread Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
toolbar Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
treectrl Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
treelist Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
typetest Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
uiaction Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
validate Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
vscroll Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
webview Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
widgets Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
wizard Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
wrapsizer Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
xrc Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
xti Update to bakefile 0.2.11 and rebake everything 2017-10-21 17:42:30 +02:00
Info.plist Update year in copyright notices to 2017 2017-01-04 11:25:00 +01:00
makefile.bcc Replace CppUnit with Catch for unit tests 2017-11-02 01:53:16 +01:00
makefile.gcc Replace CppUnit with Catch for unit tests 2017-11-02 01:53:16 +01:00
Makefile.in Build samples in parallel with "make -jN" 2017-08-15 19:16:27 +02:00
makefile.vc Replace CppUnit with Catch for unit tests 2017-11-02 01:53:16 +01:00
sample.ico
sample.rc Remove obsolete symbols from the samples 2015-12-03 22:11:04 +01:00
sample.xpm Convert all XPM files to Unix EOLs. 2015-03-19 21:46:05 +01:00
samples.bkl Fix STC samples being compiled when USE_STC=0 2017-02-12 15:17:22 +02:00