diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000000..897130147a
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "3rdparty/catch"]
+ path = 3rdparty/catch
+ url = https://github.com/wxWidgets/Catch.git
diff --git a/.travis.yml b/.travis.yml
index 899f0b5993..45a3748dbe 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,7 +48,7 @@ script:
- make -C tests
- echo -en 'travis_fold:end:script.tests\\r'
- echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'
- - pushd tests && ./test -t && popd
+ - pushd tests && ./test && popd
- echo -en 'travis_fold:end:script.testing\\r'
- echo 'Building samples...' && echo -en 'travis_fold:start:script.samples\\r'
- (test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make samples
diff --git a/3rdparty/catch b/3rdparty/catch
new file mode 160000
index 0000000000..2d91035404
--- /dev/null
+++ b/3rdparty/catch
@@ -0,0 +1 @@
+Subproject commit 2d91035404884089d1faf038300e437963e0c2a4
diff --git a/build/aclocal/cppunit.m4 b/build/aclocal/cppunit.m4
deleted file mode 100644
index 1548a61b03..0000000000
--- a/build/aclocal/cppunit.m4
+++ /dev/null
@@ -1,81 +0,0 @@
-dnl
-dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl
-AC_DEFUN([AM_PATH_CPPUNIT],
-[
-
-AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)],
- cppunit_config_prefix="$withval", cppunit_config_prefix="")
-AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)],
- cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="")
-
- if test x$cppunit_config_exec_prefix != x ; then
- cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
- if test x${CPPUNIT_CONFIG+set} != xset ; then
- CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
- fi
- fi
- if test x$cppunit_config_prefix != x ; then
- cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
- if test x${CPPUNIT_CONFIG+set} != xset ; then
- CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
- fi
- fi
-
- AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
- cppunit_version_min=$1
-
- AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
- no_cppunit=""
- if test "$CPPUNIT_CONFIG" = "no" ; then
- AC_MSG_RESULT(no)
- no_cppunit=yes
- else
- CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
- CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
- cppunit_version=`$CPPUNIT_CONFIG --version`
-
- cppunit_major_version=`echo $cppunit_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- cppunit_minor_version=`echo $cppunit_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- cppunit_micro_version=`echo $cppunit_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- cppunit_major_min=`echo $cppunit_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- cppunit_minor_min=`echo $cppunit_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- cppunit_micro_min=`echo $cppunit_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- cppunit_version_proper=`expr \
- $cppunit_major_version \> $cppunit_major_min \| \
- $cppunit_major_version \= $cppunit_major_min \& \
- $cppunit_minor_version \> $cppunit_minor_min \| \
- $cppunit_major_version \= $cppunit_major_min \& \
- $cppunit_minor_version \= $cppunit_minor_min \& \
- $cppunit_micro_version \>= $cppunit_micro_min `
-
- if test "$cppunit_version_proper" = "1" ; then
- AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
- else
- AC_MSG_RESULT(no)
- no_cppunit=yes
- fi
- fi
-
- if test "x$no_cppunit" = x ; then
- ifelse([$2], , :, [$2])
- else
- CPPUNIT_CFLAGS=""
- CPPUNIT_LIBS=""
- ifelse([$3], , :, [$3])
- fi
-
- AC_SUBST(CPPUNIT_CFLAGS)
- AC_SUBST(CPPUNIT_LIBS)
-])
-
-
-
diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl
index 174a3dbeab..ad06b70a0b 100644
--- a/build/bakefiles/config.bkl
+++ b/build/bakefiles/config.bkl
@@ -374,24 +374,6 @@ compiled .lib files and setup.h under the lib/ toplevel directory.
-
-
-
-
-
-
diff --git a/build/buildbot/config/include/csleobuild.xml b/build/buildbot/config/include/csleobuild.xml
index 646f847cc0..44b90328ac 100644
--- a/build/buildbot/config/include/csleobuild.xml
+++ b/build/buildbot/config/include/csleobuild.xml
@@ -28,7 +28,7 @@
export DYLD_LIBRARY_PATH=../lib
cd tests &&
- ./test -t &&
+ ./test &&
open ./test_gui.app
diff --git a/build/msw/config.bcc b/build/msw/config.bcc
index a3692fd67e..85bd19c840 100644
--- a/build/msw/config.bcc
+++ b/build/msw/config.bcc
@@ -196,18 +196,6 @@ WX_LIB_FLAVOUR =
CFG =
!endif
-# Compiler flags needed to compile test suite in tests directory. If you want
-# to run the tests, set it so that the compiler can find CppUnit headers.
-!ifndef CPPUNIT_CFLAGS
-CPPUNIT_CFLAGS =
-!endif
-
-# Linker flags needed to link test suite in tests directory. If you want
-# to run the tests, include CppUnit library here.
-!ifndef CPPUNIT_LIBS
-CPPUNIT_LIBS =
-!endif
-
# Version of C runtime library to use. You can change this to
# static if SHARED=0, but it is highly recommended to not do
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
diff --git a/build/msw/config.gcc b/build/msw/config.gcc
index a04404e2d1..8b1daad5fe 100644
--- a/build/msw/config.gcc
+++ b/build/msw/config.gcc
@@ -130,14 +130,6 @@ WX_LIB_FLAVOUR ?=
# compiled .lib files and setup.h under the lib/ toplevel directory.
CFG ?=
-# Compiler flags needed to compile test suite in tests directory. If you want
-# to run the tests, set it so that the compiler can find CppUnit headers.
-CPPUNIT_CFLAGS ?=
-
-# Linker flags needed to link test suite in tests directory. If you want
-# to run the tests, include CppUnit library here.
-CPPUNIT_LIBS ?=
-
# Version of C runtime library to use. You can change this to
# static if SHARED=0, but it is highly recommended to not do
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
diff --git a/build/msw/config.vc b/build/msw/config.vc
index d559d2fefc..67ee0829e4 100644
--- a/build/msw/config.vc
+++ b/build/msw/config.vc
@@ -138,14 +138,6 @@ WX_LIB_FLAVOUR =
# compiled .lib files and setup.h under the lib/ toplevel directory.
CFG =
-# Compiler flags needed to compile test suite in tests directory. If you want
-# to run the tests, set it so that the compiler can find CppUnit headers.
-CPPUNIT_CFLAGS =
-
-# Linker flags needed to link test suite in tests directory. If you want
-# to run the tests, include CppUnit library here.
-CPPUNIT_LIBS =
-
# Version of C runtime library to use. You can change this to
# static if SHARED=0, but it is highly recommended to not do
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc
index a9c7e0dba0..870b4656f4 100644
--- a/build/msw/makefile.bcc
+++ b/build/msw/makefile.bcc
@@ -36,8 +36,7 @@ MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \
-DUSE_THREADS="$(USE_THREADS)" -DUSE_CAIRO="$(USE_CAIRO)" \
-DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" -DVENDOR="$(VENDOR)" \
-DWX_FLAVOUR="$(WX_FLAVOUR)" -DWX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" \
- -DCFG="$(CFG)" -DCPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \
- -DCPPUNIT_LIBS="$(CPPUNIT_LIBS)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
+ -DCFG="$(CFG)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
WX_RELEASE_NODOT = 31
WX_VERSION_NODOT = $(WX_RELEASE_NODOT)1
COMPILER_PREFIX = bcc
diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc
index 67978cce40..5a59f1d807 100644
--- a/build/msw/makefile.gcc
+++ b/build/msw/makefile.gcc
@@ -28,7 +28,6 @@ MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)" GCC_VERSION="$(GCC_VERSION)" \
WINDRES="$(WINDRES)"
CPPDEPS = -MT$@ -MF$@.d -MD -MP
diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc
index 5f70539c5b..3882e7cc4f 100644
--- a/build/msw/makefile.vc
+++ b/build/msw/makefile.vc
@@ -27,7 +27,6 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)"
WX_RELEASE_NODOT = 31
WX_VERSION_NODOT = $(WX_RELEASE_NODOT)1
diff --git a/configure b/configure
index 70d839e1c1..55d0fbb654 100755
--- a/configure
+++ b/configure
@@ -626,7 +626,6 @@ enable_option_checking=no
enable_option_checking=fatal
ac_subst_vars='LTLIBOBJS
LIBOBJS
-CPPUNIT_CONFIG
RESCOMP
DLLTOOL
GCC
@@ -891,8 +890,6 @@ INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
RANLIB
-CPPUNIT_LIBS
-CPPUNIT_CFLAGS
HOST_SUFFIX
HEADER_PAD_OPTION
SAMPLES_CXXFLAGS
@@ -1355,8 +1352,6 @@ with_sdl_exec_prefix
enable_sdltest
enable_dependency_tracking
enable_precomp_headers
-with_cppunit_prefix
-with_cppunit_exec_prefix
'
ac_precious_vars='build_alias
host_alias
@@ -1409,9 +1404,7 @@ WEBKIT_LIBS
CAIRO_CFLAGS
CAIRO_LIBS
GST_CFLAGS
-GST_LIBS
-CPPUNIT_CFLAGS
-CPPUNIT_LIBS'
+GST_LIBS'
ac_subdirs_all='src/tiff
src/expat'
@@ -2342,8 +2335,6 @@ Optional Packages:
--with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
--with-sdl-prefix=PFX Prefix where SDL is installed (optional)
--with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)
- --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)
- --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)
Some influential environment variables:
CC C compiler command
@@ -2417,10 +2408,6 @@ Some influential environment variables:
CAIRO_LIBS linker flags for CAIRO, overriding pkg-config
GST_CFLAGS C compiler flags for GST, overriding pkg-config
GST_LIBS linker flags for GST, overriding pkg-config
- CPPUNIT_CFLAGS
- C compiler flags for CPPUNIT, overriding pkg-config
- CPPUNIT_LIBS
- linker flags for CPPUNIT, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -35891,8 +35878,6 @@ TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[A-Z]' '[a-z]'`
-
-
case "$TOOLKIT" in
GTK)
TOOLKIT_DESC="GTK+"
@@ -38524,211 +38509,7 @@ if test "$wxUSE_GUI" = "yes"; then
else
SUBDIRS="samples utils"
fi
-
-
-
-# Check whether --with-cppunit-prefix was given.
-if test "${with_cppunit_prefix+set}" = set; then :
- withval=$with_cppunit_prefix; cppunit_config_prefix="$withval"
-else
- cppunit_config_prefix=""
-fi
-
-
-# Check whether --with-cppunit-exec-prefix was given.
-if test "${with_cppunit_exec_prefix+set}" = set; then :
- withval=$with_cppunit_exec_prefix; cppunit_config_exec_prefix="$withval"
-else
- cppunit_config_exec_prefix=""
-fi
-
-
- if test x$cppunit_config_exec_prefix != x ; then
- cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
- if test x${CPPUNIT_CONFIG+set} != xset ; then
- CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
- fi
- fi
- if test x$cppunit_config_prefix != x ; then
- cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
- if test x${CPPUNIT_CONFIG+set} != xset ; then
- CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
- fi
- fi
-
- # Extract the first word of "cppunit-config", so it can be a program name with args.
-set dummy cppunit-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CPPUNIT_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $CPPUNIT_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_CPPUNIT_CONFIG="$CPPUNIT_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_CPPUNIT_CONFIG="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_path_CPPUNIT_CONFIG" && ac_cv_path_CPPUNIT_CONFIG="no"
- ;;
-esac
-fi
-CPPUNIT_CONFIG=$ac_cv_path_CPPUNIT_CONFIG
-if test -n "$CPPUNIT_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPUNIT_CONFIG" >&5
-$as_echo "$CPPUNIT_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- cppunit_version_min=1.8.0
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Cppunit - version >= $cppunit_version_min" >&5
-$as_echo_n "checking for Cppunit - version >= $cppunit_version_min... " >&6; }
- no_cppunit=""
- if test "$CPPUNIT_CONFIG" = "no" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- no_cppunit=yes
- else
- CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
- CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
- cppunit_version=`$CPPUNIT_CONFIG --version`
-
- cppunit_major_version=`echo $cppunit_version | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
- cppunit_minor_version=`echo $cppunit_version | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
- cppunit_micro_version=`echo $cppunit_version | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
-
- cppunit_major_min=`echo $cppunit_version_min | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
- cppunit_minor_min=`echo $cppunit_version_min | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
- cppunit_micro_min=`echo $cppunit_version_min | \
- sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
-
- cppunit_version_proper=`expr \
- $cppunit_major_version \> $cppunit_major_min \| \
- $cppunit_major_version \= $cppunit_major_min \& \
- $cppunit_minor_version \> $cppunit_minor_min \| \
- $cppunit_major_version \= $cppunit_major_min \& \
- $cppunit_minor_version \= $cppunit_minor_min \& \
- $cppunit_micro_version \>= $cppunit_micro_min `
-
- if test "$cppunit_version_proper" = "1" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version" >&5
-$as_echo "$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- no_cppunit=yes
- fi
- fi
-
- if test "x$no_cppunit" = x ; then
- SUBDIRS="$SUBDIRS tests"
- else
- CPPUNIT_CFLAGS=""
- CPPUNIT_LIBS=""
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPUNIT" >&5
-$as_echo_n "checking for CPPUNIT... " >&6; }
-
-if test -n "$PKG_CONFIG"; then
- if test -n "$CPPUNIT_CFLAGS"; then
- pkg_cv_CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS"
- else
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.8.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "cppunit >= 1.8.0") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.8.0" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
- if test -n "$CPPUNIT_LIBS"; then
- pkg_cv_CPPUNIT_LIBS="$CPPUNIT_LIBS"
- else
- if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.8.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "cppunit >= 1.8.0") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- pkg_cv_CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.8.0" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- fi
-else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cppunit >= 1.8.0"`
- else
- CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cppunit >= 1.8.0"`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$CPPUNIT_PKG_ERRORS" >&5
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cppunit not found" >&5
-$as_echo "$as_me: WARNING: cppunit not found" >&2;}
-
-elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cppunit not found" >&5
-$as_echo "$as_me: WARNING: cppunit not found" >&2;}
-
-else
- CPPUNIT_CFLAGS=$pkg_cv_CPPUNIT_CFLAGS
- CPPUNIT_LIBS=$pkg_cv_CPPUNIT_LIBS
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SUBDIRS="$SUBDIRS tests"
-fi
-
-
- fi
-
-
-
-
+SUBDIRS="$SUBDIRS tests"
for subdir in $SUBDIRS; do
if test -d ${srcdir}/${subdir} ; then
diff --git a/configure.in b/configure.in
index 6c8c606061..a8bc2b94e3 100644
--- a/configure.in
+++ b/configure.in
@@ -7903,8 +7903,6 @@ AC_SUBST(SAMPLES_RPATH_FLAG)
AC_SUBST(SAMPLES_CXXFLAGS)
AC_SUBST(HEADER_PAD_OPTION)
AC_SUBST(HOST_SUFFIX)
-AC_SUBST(CPPUNIT_CFLAGS)
-AC_SUBST(CPPUNIT_LIBS)
case "$TOOLKIT" in
GTK)
@@ -8189,16 +8187,7 @@ else
dnl there are no wxBase programs in demos
SUBDIRS="samples utils"
fi
-dnl Add tests to the list of subdirs if cppunit 1.8.0+ is detected
-AM_PATH_CPPUNIT(1.8.0,
- [SUBDIRS="$SUBDIRS tests"],
- [
- PKG_CHECK_MODULES(CPPUNIT, [cppunit >= 1.8.0],
- [SUBDIRS="$SUBDIRS tests"],
- [AC_MSG_WARN([cppunit not found])]
- )
- ]
-)
+SUBDIRS="$SUBDIRS tests"
for subdir in $SUBDIRS; do
if test -d ${srcdir}/${subdir} ; then
diff --git a/demos/makefile.bcc b/demos/makefile.bcc
index 8f5637aa16..a3a9f2b534 100644
--- a/demos/makefile.bcc
+++ b/demos/makefile.bcc
@@ -36,8 +36,7 @@ MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \
-DUSE_THREADS="$(USE_THREADS)" -DUSE_CAIRO="$(USE_CAIRO)" \
-DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" -DVENDOR="$(VENDOR)" \
-DWX_FLAVOUR="$(WX_FLAVOUR)" -DWX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" \
- -DCFG="$(CFG)" -DCPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \
- -DCPPUNIT_LIBS="$(CPPUNIT_LIBS)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
+ -DCFG="$(CFG)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/demos/makefile.gcc b/demos/makefile.gcc
index 99ff9d97ef..b67300969b 100644
--- a/demos/makefile.gcc
+++ b/demos/makefile.gcc
@@ -28,7 +28,6 @@ MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)" GCC_VERSION="$(GCC_VERSION)" \
WINDRES="$(WINDRES)"
diff --git a/demos/makefile.vc b/demos/makefile.vc
index 98045b92c3..60e98d0fc2 100644
--- a/demos/makefile.vc
+++ b/demos/makefile.vc
@@ -27,7 +27,6 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/docs/contributing/how-to-write-unit-tests.md b/docs/contributing/how-to-write-unit-tests.md
index 152fdd21b3..42955ed6bc 100644
--- a/docs/contributing/how-to-write-unit-tests.md
+++ b/docs/contributing/how-to-write-unit-tests.md
@@ -1,144 +1,94 @@
How to write unit tests for wxWidgets
=====================================
-Unit tests for wxWidgets are written using small cppunit framework. To compile
-(but not to run) them you need to have it installed. Hence the first part of
-this note explains how to do it while the second one explains how to write the
-test.
+wxWidgets unit tests use [Catch](http://catch-lib.net/) framework. It is
+included in wxWidgets as a submodule, so you will need to run
-I. CppUnit Installation
------------------------
+ $ git submodule update --init 3rdparty/catch
-1. Get it from http://www.sourceforge.net/projects/cppunit
- (latest version as of the time of this writing is 1.10.2)
+to get it before the first use. Catch is header-only and doesn't need to be
+compiled.
-2. Build the library:
- - Under Windows using VC++:
- - build everything in CppUnitLibraries.dsw work space
- - add include and lib subdirectories of the directory
- where you installed cppunit to the compiler search path
- using "Tools|Options" menu in VC IDE
+Testing with Catch
+------------------
- - Under Unix: run `configure && make && make install` as usual
+**WARNING**: Most of the existing tests are currently still written in the
+CppUnit style, please do _not_ follow them when writing new tests, the old
+style is too complex and unnecessary.
+
+Writing tests with Catch is almost embarrassingly simple: you need to just
+add a new test case and use Catch assertion macros inside it, e.g.
+
+ TEST_CASE("MyNewTest", "[my][new][another-tag]")
+ {
+ wxString s("Hello, world!");
+ CHECK( s.BeforeFirst(",") == "Hello" );
+ CHECK( s.AfterLast(" ") == "world!" );
+ }
+
+This is all, the new test will be automatically run when you run the full test
+suite or you can run just it using
+
+ $ ./test MyNewTest
+
+(see below for more about running tests).
+
+See [Catch tutorial](https://github.com/philsquared/Catch/blob/v1.11.0/docs/tutorial.md)
+for more information.
-II. Writing tests with CppUnit
-------------------------------
+Tests physical structure
+------------------------
-1. Create a new directory tests/foo
+All (i.e. both GUI and non-GUI) unit tests are under `tests` subdirectory. When
+adding a new test, try to find an existing file to add it to. If there are no
+applicable files, try to add a new file to an existing directory. If there is
+no applicable directory neither, create a new one and put the new file there
+(i.e. do _not_ put new files directly under `tests`). If your test is small,
+consider adding it to `tests/misc/misctests.cpp`.
-2. Write a cpp file for the test copying, if you want,
- from one of the existing tests. The things to look for:
+If you add a new file, you need to update `tests/test.bkl` and add a
+`` tag for your new file.bkl. Make sure it's in the correct section:
+the one starting `GetTopWindow()`. This
- class adds two new functions, GetEventCount, which takes an optional
- wxEventType. It then returns the number of events of that type that it has
- received since the last call. Passing nothing returns the total number of
- event received since the last call. Also there is OnEvent, which counts the
- events based on type that are passed to it. To make it easy to count events
- there is also a new class called EventCounter which takes a window and event
- type and connects the window to the top level wxTestableFrame with the specific
- event type. It disconnects again once it is out of scope. It simply reduces
- the amount of typing required to count events.
-
-3. add a `` tag for your source file to tests/test.bkl. Make sure it's
- in the correct section: the one starting `
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CATCH_CPPUNIT_H_
+#define _WX_CATCH_CPPUNIT_H_
+
+#include "catch.hpp"
+
+// CppUnit-compatible macros.
+
+// CPPUNIT_ASSERTs are mapped to REQUIRE(), not CHECK(), as this is how CppUnit
+// works but in many cases they really should be CHECK()s instead, i.e. the
+// test should continue to run even if one assert failed. Unfortunately there
+// is no automatic way to know it, so the existing code will need to be
+// reviewed and CHECK() used explicitly where appropriate.
+//
+// Also notice that we don't use parentheses around x and y macro arguments in
+// the macro expansion, as usual. This is because these parentheses would then
+// appear in CATCH error messages if the assertion fails, making them much less
+// readable and omitting should be fine here, exceptionally, as the arguments
+// of these macros are usually just simple expressions.
+#define CPPUNIT_ASSERT(cond) REQUIRE(cond)
+#define CPPUNIT_ASSERT_EQUAL(x, y) REQUIRE(x == y)
+
+// Using INFO() disallows putting more than one of these macros on the same
+// line but this can happen if they're used inside another macro, so wrap it
+// inside a scope.
+#define CPPUNIT_ASSERT_MESSAGE(msg, cond) \
+ do { INFO(msg); REQUIRE(cond); } while (Catch::alwaysFalse())
+
+#define CPPUNIT_ASSERT_EQUAL_MESSAGE(msg, x, y) \
+ do { INFO(msg); REQUIRE(x == y); } while (Catch::alwaysFalse())
+
+// CATCH Approx class uses the upper bound of "epsilon*(scale + max(|x|, |y|))"
+// for |x - y| which is not really compatible with our fixed delta, so we can't
+// use it here.
+#define CPPUNIT_ASSERT_DOUBLES_EQUAL(x, y, delta) \
+ REQUIRE(std::abs(x - y) < delta)
+
+#define CPPUNIT_FAIL(msg) FAIL(msg)
+
+#define CPPUNIT_ASSERT_THROW(expr, exception) \
+ try \
+ { \
+ expr; \
+ FAIL("Expected exception of type " #exception \
+ " not thrown by " #expr); \
+ } \
+ catch ( exception& ) {}
+
+// Define conversions to strings for some common wxWidgets types.
+namespace Catch
+{
+ template <>
+ struct StringMaker
+ {
+ static std::string convert(wxUniChar uc)
+ {
+ return wxString(uc).ToStdString(wxConvUTF8);
+ }
+ };
+
+ template <>
+ struct StringMaker
+ {
+ static std::string convert(wxUniCharRef ucr)
+ {
+ return wxString(ucr).ToStdString(wxConvUTF8);
+ }
+ };
+}
+
+// Use a different namespace for our mock ups of the real declarations in
+// CppUnit namespace to avoid clashes if we end up being linked with the real
+// CppUnit library, but bring it into scope with a using directive below to
+// make it possible to compile the original code using CppUnit unmodified.
+namespace CatchCppUnit
+{
+
+namespace CppUnit
+{
+
+// These classes don't really correspond to the real CppUnit ones, but contain
+// just the minimum we need to make CPPUNIT_TEST() macro and our mock up of
+// TestSuite class work.
+
+class Test
+{
+public:
+ // Name argument exists only for compatibility with the real CppUnit but is
+ // not used here.
+ explicit Test(const std::string& name = std::string()) : m_name(name) { }
+
+ virtual ~Test() { }
+
+ virtual void runTest() = 0;
+
+ const std::string& getName() const { return m_name; }
+
+private:
+ std::string m_name;
+};
+
+class TestCase : public Test
+{
+public:
+ explicit TestCase(const std::string& name = std::string()) : Test(name) { }
+
+ virtual void setUp() {}
+ virtual void tearDown() {}
+};
+
+class TestSuite : public Test
+{
+public:
+ explicit TestSuite(const std::string& name = std::string()) : Test(name) { }
+
+ ~TestSuite()
+ {
+ for ( size_t n = 0; n < m_tests.size(); ++n )
+ {
+ delete m_tests[n];
+ }
+ }
+
+ void addTest(Test* test) { m_tests.push_back(test); }
+ size_t getChildTestCount() const { return m_tests.size(); }
+
+ void runTest() wxOVERRIDE
+ {
+ for ( size_t n = 0; n < m_tests.size(); ++n )
+ {
+ m_tests[n]->runTest();
+ }
+ }
+
+private:
+ std::vector m_tests;
+
+ wxDECLARE_NO_COPY_CLASS(TestSuite);
+};
+
+} // namespace CppUnit
+
+} // namespace CatchCppUnit
+
+using namespace CatchCppUnit;
+
+// Helpers used in the implementation of the macros below.
+namespace wxPrivate
+{
+
+// An object which resets a string to its old value when going out of scope.
+class TempStringAssign
+{
+public:
+ explicit TempStringAssign(std::string& str, const char* value)
+ : m_str(str),
+ m_orig(str)
+ {
+ str = value;
+ }
+
+ ~TempStringAssign()
+ {
+ m_str = m_orig;
+ }
+
+private:
+ std::string& m_str;
+ const std::string m_orig;
+
+ wxDECLARE_NO_COPY_CLASS(TempStringAssign);
+};
+
+// These two strings are used to implement wxGetCurrentTestName() and must be
+// defined in the test driver.
+extern std::string wxTheCurrentTestClass, wxTheCurrentTestMethod;
+
+} // namespace wxPrivate
+
+inline std::string wxGetCurrentTestName()
+{
+ std::string s = wxPrivate::wxTheCurrentTestClass;
+ if ( !s.empty() && !wxPrivate::wxTheCurrentTestMethod.empty() )
+ s += "::";
+ s += wxPrivate::wxTheCurrentTestMethod;
+
+ return s;
+}
+
+// Notice that the use of this macro unconditionally changes the protection for
+// everything that follows it to "public". This is necessary to allow taking
+// the address of the runTest() method in CPPUNIT_TEST_SUITE_REGISTRATION()
+// below and there just doesn't seem to be any way around it.
+#define CPPUNIT_TEST_SUITE(testclass) \
+ public: \
+ void runTest() wxOVERRIDE \
+ { \
+ struct EatNextSemicolon
+
+#define CPPUNIT_TEST(testname) \
+ SECTION(#testname " test") \
+ { \
+ setUp(); \
+ try \
+ { \
+ testname(); \
+ } \
+ catch ( ... ) \
+ { \
+ tearDown(); \
+ throw; \
+ } \
+ tearDown(); \
+ }
+
+#define CPPUNIT_TEST_SUITE_END() \
+ } \
+ struct EatNextSemicolon
+
+#define wxREGISTER_UNIT_TEST_WITH_TAGS(testclass, tags) \
+ METHOD_AS_TEST_CASE(testclass::runTest, #testclass, tags) \
+ struct EatNextSemicolon
+
+#define CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(testclass, suitename) \
+ wxREGISTER_UNIT_TEST_WITH_TAGS(testclass, "[" suitename "]")
+
+// Existings tests always use both this macro and the named registration one
+// above, but we can't register the same test case twice with CATCH, so simply
+// ignore this one.
+#define CPPUNIT_TEST_SUITE_REGISTRATION(testclass) \
+ struct EatNextSemicolon
+
+// ----------------------------------------------------------------------------
+// wxWidgets-specific macros
+// ----------------------------------------------------------------------------
+
+// Convenient variant of INFO() which uses wxString::Format() internally.
+#define wxINFO_FMT_HELPER(fmt, ...) \
+ wxString::Format(fmt, __VA_ARGS__).ToStdString(wxConvUTF8)
+
+#define wxINFO_FMT(...) INFO(wxINFO_FMT_HELPER(__VA_ARGS__))
+
+// Use this macro to assert with the given formatted message (it should contain
+// the format string and arguments in a separate pair of parentheses)
+#define WX_ASSERT_MESSAGE(msg, cond) \
+ CPPUNIT_ASSERT_MESSAGE(std::string(wxString::Format msg .mb_str()), (cond))
+
+#define WX_ASSERT_EQUAL_MESSAGE(msg, expected, actual) \
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(std::string(wxString::Format msg .mb_str()), \
+ (expected), (actual))
+
+#endif // _WX_CATCH_CPPUNIT_H_
diff --git a/include/wx/cppunit.h b/include/wx/cppunit.h
deleted file mode 100644
index 70ccd97784..0000000000
--- a/include/wx/cppunit.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/cppunit.h
-// Purpose: wrapper header for CppUnit headers
-// Author: Vadim Zeitlin
-// Created: 15.02.04
-// Copyright: (c) 2004 Vadim Zeitlin
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CPPUNIT_H_
-#define _WX_CPPUNIT_H_
-
-///////////////////////////////////////////////////////////////////////////////
-// using CPPUNIT_TEST() macro results in this warning, disable it as there is
-// no other way to get rid of it and it's not very useful anyhow
-#ifdef __VISUALC__
- // typedef-name 'foo' used as synonym for class-name 'bar'
- #pragma warning(disable:4097)
-
- // unreachable code: we don't care about warnings in CppUnit headers
- #pragma warning(disable:4702)
-
- // 'id': identifier was truncated to 'num' characters in the debug info
- #pragma warning(disable:4786)
-#endif // __VISUALC__
-
-#ifdef __BORLANDC__
- #pragma warn -8022
-#endif
-
-#ifndef CPPUNIT_STD_NEED_ALLOCATOR
- #define CPPUNIT_STD_NEED_ALLOCATOR 0
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Set the default format for the errors, which can be used by an IDE to jump
-// to the error location. This default gets overridden by the cppunit headers
-// for some compilers (e.g. VC++).
-
-#ifndef CPPUNIT_COMPILER_LOCATION_FORMAT
- #define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l:"
-#endif
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Include all needed cppunit headers.
-//
-
-#include "wx/beforestd.h"
-#ifdef __VISUALC__
- #pragma warning(push)
-
- // with cppunit 1.12 we get many bogus warnings 4701 (local variable may be
- // used without having been initialized) in TestAssert.h
- #pragma warning(disable:4701)
-
- // and also 4100 (unreferenced formal parameter) in extensions/
- // ExceptionTestCaseDecorator.h
- #pragma warning(disable:4100)
-#endif
-
-#include
-#include
-#include
-#include
-#include
-
-#ifdef __VISUALC__
- #pragma warning(pop)
-#endif
-#include "wx/afterstd.h"
-
-#include "wx/string.h"
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Set of helpful test macros.
-//
-
-// Base macro for wrapping CPPUNIT_TEST macros and so making them conditional
-// tests, meaning that the test only get registered and thus run when a given
-// runtime condition is true.
-// In case the condition is evaluated as false a skip message is logged
-// (the message will only be shown in verbose mode).
-#define WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, anyTest) \
- if (Condition) \
- { anyTest; } \
- else \
- wxLogInfo(wxString::Format(wxT("skipping: %s.%s\n reason: %s equals false\n"), \
- wxString(suiteName, wxConvUTF8).c_str(), \
- wxString(#testMethod, wxConvUTF8).c_str(), \
- wxString(#Condition, wxConvUTF8).c_str()))
-
-// Conditional CPPUNIT_TEST macro.
-#define WXTEST_WITH_CONDITION(suiteName, Condition, testMethod) \
- WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST(testMethod))
-// Conditional CPPUNIT_TEST_FAIL macro.
-#define WXTEST_FAIL_WITH_CONDITION(suiteName, Condition, testMethod) \
- WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST_FAIL(testMethod))
-
-CPPUNIT_NS_BEGIN
-
-// provide an overload of cppunit assertEquals(T, T) which can be used to
-// compare wxStrings directly with C strings
-inline void
-assertEquals(const char *expected,
- const char *actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(wxString(expected), wxString(actual), sourceLine, message);
-}
-
-inline void
-assertEquals(const char *expected,
- const wxString& actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(wxString(expected), actual, sourceLine, message);
-}
-
-inline void
-assertEquals(const wxString& expected,
- const char *actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(expected, wxString(actual), sourceLine, message);
-}
-
-inline void
-assertEquals(const wchar_t *expected,
- const wxString& actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(wxString(expected), actual, sourceLine, message);
-}
-
-inline void
-assertEquals(const wxString& expected,
- const wchar_t *actual,
- CppUnit::SourceLine sourceLine,
- const std::string& message)
-{
- assertEquals(expected, wxString(actual), sourceLine, message);
-}
-
-CPPUNIT_NS_END
-
-// define an assertEquals() overload for the given types, this is a helper used
-// by WX_CPPUNIT_ALLOW_EQUALS_TO_INT() below
-#define WX_CPPUNIT_ASSERT_EQUALS(T1, T2) \
- inline void \
- assertEquals(T1 expected, \
- T2 actual, \
- CppUnit::SourceLine sourceLine, \
- const std::string& message) \
- { \
- if ( !assertion_traits::equal(expected,actual) ) \
- { \
- Asserter::failNotEqual( assertion_traits::toString(expected), \
- assertion_traits::toString(actual), \
- sourceLine, \
- message ); \
- } \
- }
-
-// this macro allows us to specify (usually literal) ints as expected values
-// for functions returning integral types different from "int"
-#define WX_CPPUNIT_ALLOW_EQUALS_TO_INT(T) \
- CPPUNIT_NS_BEGIN \
- WX_CPPUNIT_ASSERT_EQUALS(int, T) \
- WX_CPPUNIT_ASSERT_EQUALS(T, int) \
- CPPUNIT_NS_END
-
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(long)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(short)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned long)
-
-#if defined( __VMS ) && defined( __ia64 )
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(std::basic_streambuf::pos_type);
-#endif
-
-#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxLongLong_t)
-WX_CPPUNIT_ALLOW_EQUALS_TO_INT(unsigned wxLongLong_t)
-#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
-
-// Use this macro to compare a wxArrayString with the pipe-separated elements
-// of the given string
-//
-// NB: it's a macro and not a function to have the correct line numbers in the
-// test failure messages
-#define WX_ASSERT_STRARRAY_EQUAL(s, a) \
- { \
- wxArrayString expected(wxSplit(s, '|', '\0')); \
- \
- CPPUNIT_ASSERT_EQUAL( expected.size(), a.size() ); \
- \
- for ( size_t n = 0; n < a.size(); n++ ) \
- { \
- CPPUNIT_ASSERT_EQUAL( expected[n], a[n] ); \
- } \
- }
-
-// Use this macro to assert with the given formatted message (it should contain
-// the format string and arguments in a separate pair of parentheses)
-#define WX_ASSERT_MESSAGE(msg, cond) \
- CPPUNIT_ASSERT_MESSAGE(std::string(wxString::Format msg .mb_str()), (cond))
-
-#define WX_ASSERT_EQUAL_MESSAGE(msg, expected, actual) \
- CPPUNIT_ASSERT_EQUAL_MESSAGE(std::string(wxString::Format msg .mb_str()), \
- (expected), (actual))
-
-///////////////////////////////////////////////////////////////////////////////
-// define stream inserter for wxString if it's not defined in the main library,
-// we need it to output the test failures involving wxString
-#if !wxUSE_STD_IOSTREAM
-
-#include "wx/string.h"
-
-#include
-
-inline std::ostream& operator<<(std::ostream& o, const wxString& s)
-{
-#if wxUSE_UNICODE
- return o << (const char *)wxSafeConvertWX2MB(s.wc_str());
-#else
- return o << s.c_str();
-#endif
-}
-
-#endif // !wxUSE_STD_IOSTREAM
-
-///////////////////////////////////////////////////////////////////////////////
-// Some more compiler warning tweaking and auto linking.
-//
-
-#ifdef __BORLANDC__
- #pragma warn .8022
-#endif
-
-#ifdef _MSC_VER
- #pragma warning(default:4702)
-#endif // _MSC_VER
-
-// for VC++ automatically link in cppunit library
-#ifdef __VISUALC__
- #ifdef NDEBUG
- #pragma comment(lib, "cppunit.lib")
- #else // Debug
- #pragma comment(lib, "cppunitd.lib")
- #endif // Release/Debug
-#endif
-
-#endif // _WX_CPPUNIT_H_
-
diff --git a/samples/html/makefile.bcc b/samples/html/makefile.bcc
index 8920175db8..f65af1fe6a 100644
--- a/samples/html/makefile.bcc
+++ b/samples/html/makefile.bcc
@@ -36,8 +36,7 @@ MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \
-DUSE_THREADS="$(USE_THREADS)" -DUSE_CAIRO="$(USE_CAIRO)" \
-DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" -DVENDOR="$(VENDOR)" \
-DWX_FLAVOUR="$(WX_FLAVOUR)" -DWX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" \
- -DCFG="$(CFG)" -DCPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \
- -DCPPUNIT_LIBS="$(CPPUNIT_LIBS)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
+ -DCFG="$(CFG)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/samples/html/makefile.gcc b/samples/html/makefile.gcc
index 42d59e495a..556e0a25cc 100644
--- a/samples/html/makefile.gcc
+++ b/samples/html/makefile.gcc
@@ -28,7 +28,6 @@ MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)" GCC_VERSION="$(GCC_VERSION)" \
WINDRES="$(WINDRES)"
diff --git a/samples/html/makefile.vc b/samples/html/makefile.vc
index 14b2219897..e843ed1d9f 100644
--- a/samples/html/makefile.vc
+++ b/samples/html/makefile.vc
@@ -27,7 +27,6 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/samples/makefile.bcc b/samples/makefile.bcc
index db8f31e3ac..a8358a557f 100644
--- a/samples/makefile.bcc
+++ b/samples/makefile.bcc
@@ -36,8 +36,7 @@ MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \
-DUSE_THREADS="$(USE_THREADS)" -DUSE_CAIRO="$(USE_CAIRO)" \
-DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" -DVENDOR="$(VENDOR)" \
-DWX_FLAVOUR="$(WX_FLAVOUR)" -DWX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" \
- -DCFG="$(CFG)" -DCPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \
- -DCPPUNIT_LIBS="$(CPPUNIT_LIBS)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
+ -DCFG="$(CFG)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/samples/makefile.gcc b/samples/makefile.gcc
index 01c4b6e1f1..a2b888ebe7 100644
--- a/samples/makefile.gcc
+++ b/samples/makefile.gcc
@@ -28,7 +28,6 @@ MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)" GCC_VERSION="$(GCC_VERSION)" \
WINDRES="$(WINDRES)"
diff --git a/samples/makefile.vc b/samples/makefile.vc
index 120e60a236..ca0f0b1fc0 100644
--- a/samples/makefile.vc
+++ b/samples/makefile.vc
@@ -27,7 +27,6 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/samples/opengl/makefile.bcc b/samples/opengl/makefile.bcc
index 378104c434..a23138ce25 100644
--- a/samples/opengl/makefile.bcc
+++ b/samples/opengl/makefile.bcc
@@ -36,8 +36,7 @@ MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \
-DUSE_THREADS="$(USE_THREADS)" -DUSE_CAIRO="$(USE_CAIRO)" \
-DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" -DVENDOR="$(VENDOR)" \
-DWX_FLAVOUR="$(WX_FLAVOUR)" -DWX_LIB_FLAVOUR="$(WX_LIB_FLAVOUR)" \
- -DCFG="$(CFG)" -DCPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \
- -DCPPUNIT_LIBS="$(CPPUNIT_LIBS)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
+ -DCFG="$(CFG)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/samples/opengl/makefile.gcc b/samples/opengl/makefile.gcc
index c7506234ac..bc7c65cc39 100644
--- a/samples/opengl/makefile.gcc
+++ b/samples/opengl/makefile.gcc
@@ -28,7 +28,6 @@ MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)" GCC_VERSION="$(GCC_VERSION)" \
WINDRES="$(WINDRES)"
diff --git a/samples/opengl/makefile.vc b/samples/opengl/makefile.vc
index 4f455e4ae8..0d6ecfb604 100644
--- a/samples/opengl/makefile.vc
+++ b/samples/opengl/makefile.vc
@@ -27,7 +27,6 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
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)" \
- CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
RUNTIME_LIBS="$(RUNTIME_LIBS)"
### Conditionally set variables: ###
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7f32cdbafb..09456fcfb3 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -28,8 +28,6 @@ CXXFLAGS = @CXXFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
-CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@
-CPPUNIT_LIBS = @CPPUNIT_LIBS@
TOOLKIT = @TOOLKIT@
TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
TOOLKIT_VERSION = @TOOLKIT_VERSION@
@@ -55,7 +53,8 @@ LIBDIRNAME = $(wx_top_builddir)/lib
TEST_CXXFLAGS = $(__test_PCH_INC) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 \
- $(CPPUNIT_CFLAGS) $(CXXWARNINGS) $(SAMPLES_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS)
+ -I$(top_srcdir)/3rdparty/catch/include $(CXXWARNINGS) $(SAMPLES_CXXFLAGS) \
+ $(CPPFLAGS) $(CXXFLAGS)
TEST_OBJECTS = \
test_test.o \
test_anytest.o \
@@ -115,7 +114,6 @@ TEST_OBJECTS = \
test_crt.o \
test_vsnprintf.o \
test_hexconv.o \
- test_bstream.o \
test_datastreamtest.o \
test_ffilestream.o \
test_fileback.o \
@@ -146,8 +144,8 @@ TEST_ODEP = $(_____pch_testprec_test_testprec_h_gch___depname)
TEST_DRAWING_CXXFLAGS = $(__test_drawing_PCH_INC) -D__WX$(TOOLKIT)__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
$(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) \
- -DwxUSE_GUI=0 $(CPPUNIT_CFLAGS) $(CXXWARNINGS) $(SAMPLES_CXXFLAGS) \
- $(CPPFLAGS) $(CXXFLAGS)
+ -DwxUSE_GUI=0 -I$(top_srcdir)/3rdparty/catch/include $(CXXWARNINGS) \
+ $(SAMPLES_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS)
TEST_DRAWING_OBJECTS = \
test_drawing_test.o \
test_drawing_drawing.o \
@@ -165,8 +163,8 @@ TEST_DRAWINGPLUGIN_OBJECTS = \
TEST_GUI_CXXFLAGS = $(__test_gui_PCH_INC) -D__WX$(TOOLKIT)__ \
$(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
$(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) -I$(srcdir) $(__DLLFLAG_p) \
- -I$(srcdir)/../samples $(CPPUNIT_CFLAGS) $(CXXWARNINGS) $(SAMPLES_CXXFLAGS) \
- $(CPPFLAGS) $(CXXFLAGS)
+ -I$(srcdir)/../samples -I$(top_srcdir)/3rdparty/catch/include \
+ $(CXXWARNINGS) $(SAMPLES_CXXFLAGS) $(CPPFLAGS) $(CXXFLAGS)
TEST_GUI_OBJECTS = \
$(__test_gui___win32rc) \
test_gui_asserthelper.o \
@@ -303,7 +301,6 @@ TEST_GUI_ODEP = $(_____pch_testprec_test_gui_testprec_h_gch___depname)
@COND_SHARED_1@__DLLFLAG_p_6 = --define WXUSINGDLL
@COND_TOOLKIT_MSW@__RCDEFDIR_p = --include-dir \
@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
-@COND_PLATFORM_WIN32_1@__test_gui___win32rc = test_gui_sample_rc.o
@COND_PLATFORM_MACOSX_1_USE_GUI_1@__test_gui_app_Contents_PkgInfo___depname \
@COND_PLATFORM_MACOSX_1_USE_GUI_1@ = test_gui.app/Contents/PkgInfo
@COND_PLATFORM_MACOSX_1_USE_GUI_1@__test_gui_bundle___depname \
@@ -318,6 +315,7 @@ TEST_GUI_ODEP = $(_____pch_testprec_test_gui_testprec_h_gch___depname)
@COND_TOOLKIT_OSX_IPHONE@ = $(__test_gui_app_Contents_PkgInfo___depname)
@COND_TOOLKIT_COCOA@____test_gui_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_COCOA@ $(__test_gui_app_Contents_PkgInfo___depname)
+@COND_PLATFORM_WIN32_1@__test_gui___win32rc = test_gui_sample_rc.o
@COND_GCC_PCH_1@__test_gui_PCH_INC = -I./.pch/testprec_test_gui
@COND_ICC_PCH_1@__test_gui_PCH_INC = $(ICC_PCH_USE_SWITCH) \
@COND_ICC_PCH_1@ ./.pch/testprec_test_gui/testprec.h.gch
@@ -405,13 +403,13 @@ distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
test$(EXEEXT): $(TEST_OBJECTS)
- $(CXX) -o $@ $(TEST_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(CPPUNIT_LIBS) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
+ $(CXX) -o $@ $(TEST_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_NET_p) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_PNG_IF_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
@COND_USE_PCH_1@./.pch/testprec_test/testprec.h.gch:
@COND_USE_PCH_1@ $(BK_MAKE_PCH) ./.pch/testprec_test/testprec.h.gch testprec.h $(CXX) $(TEST_CXXFLAGS)
@COND_USE_GUI_1@test_drawing$(EXEEXT): $(TEST_DRAWING_OBJECTS)
-@COND_USE_GUI_1@ $(CXX) -o $@ $(TEST_DRAWING_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(CPPUNIT_LIBS) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
+@COND_USE_GUI_1@ $(CXX) -o $@ $(TEST_DRAWING_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
@COND_USE_PCH_1@./.pch/testprec_test_drawing/testprec.h.gch:
@COND_USE_PCH_1@ $(BK_MAKE_PCH) ./.pch/testprec_test_drawing/testprec.h.gch testprec.h $(CXX) $(TEST_DRAWING_CXXFLAGS)
@@ -420,7 +418,7 @@ test$(EXEEXT): $(TEST_OBJECTS)
@COND_SHARED_1_USE_GUI_1@ $(SHARED_LD_MODULE_CXX) $@ $(TEST_DRAWINGPLUGIN_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
@COND_USE_GUI_1@test_gui$(EXEEXT): $(TEST_GUI_OBJECTS) $(__test_gui___win32rc)
-@COND_USE_GUI_1@ $(CXX) -o $@ $(TEST_GUI_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(CPPUNIT_LIBS) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(EXTRALIBS_MEDIA) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
+@COND_USE_GUI_1@ $(CXX) -o $@ $(TEST_GUI_OBJECTS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(EXTRALIBS_MEDIA) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(EXTRALIBS_XML) $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
@COND_PLATFORM_MACOSX_1_USE_GUI_1@test_gui.app/Contents/PkgInfo: $(__test_gui___depname) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns
@COND_PLATFORM_MACOSX_1_USE_GUI_1@ mkdir -p test_gui.app/Contents
@@ -669,9 +667,6 @@ test_vsnprintf.o: $(srcdir)/strings/vsnprintf.cpp $(TEST_ODEP)
test_hexconv.o: $(srcdir)/strings/hexconv.cpp $(TEST_ODEP)
$(CXXC) -c -o $@ $(TEST_CXXFLAGS) $(srcdir)/strings/hexconv.cpp
-test_bstream.o: $(srcdir)/streams/bstream.cpp $(TEST_ODEP)
- $(CXXC) -c -o $@ $(TEST_CXXFLAGS) $(srcdir)/streams/bstream.cpp
-
test_datastreamtest.o: $(srcdir)/streams/datastreamtest.cpp $(TEST_ODEP)
$(CXXC) -c -o $@ $(TEST_CXXFLAGS) $(srcdir)/streams/datastreamtest.cpp
@@ -769,7 +764,7 @@ test_drawingplugin_pluginsample.o: $(srcdir)/drawing/pluginsample.cpp
$(CXXC) -c -o $@ $(TEST_DRAWINGPLUGIN_CXXFLAGS) $(srcdir)/drawing/pluginsample.cpp
test_gui_sample_rc.o: $(srcdir)/../samples/sample.rc $(TEST_GUI_ODEP)
- $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_6) $(__DEBUG_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) --include-dir $(srcdir) $(__DLLFLAG_p_6) --include-dir $(srcdir)/../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include
+ $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_6) $(__DEBUG_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) --include-dir $(srcdir) $(__DLLFLAG_p_6) --include-dir $(srcdir)/../samples $(__RCDEFDIR_p) --include-dir $(top_srcdir)/include --include-dir $(top_srcdir)/3rdparty/catch/include
test_gui_asserthelper.o: $(srcdir)/asserthelper.cpp $(TEST_GUI_ODEP)
$(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/asserthelper.cpp
diff --git a/tests/any/anytest.cpp b/tests/any/anytest.cpp
index 2503386fed..f35ff629ee 100644
--- a/tests/any/anytest.cpp
+++ b/tests/any/anytest.cpp
@@ -21,6 +21,18 @@
#include
+namespace Catch
+{
+ template <>
+ struct StringMaker
+ {
+ static std::string convert(const wxVariant& v)
+ {
+ return v.MakeString().ToStdString(wxConvUTF8);
+ }
+ };
+}
+
// ----------------------------------------------------------------------------
// test class
// ----------------------------------------------------------------------------
diff --git a/tests/archive/archivetest.cpp b/tests/archive/archivetest.cpp
index d9b5568adf..7742b0caeb 100644
--- a/tests/archive/archivetest.cpp
+++ b/tests/archive/archivetest.cpp
@@ -808,8 +808,8 @@ void ArchiveTestCase::ExtractArchive(wxInputStream& in)
// non-seekable entries are allowed to have GetSize == wxInvalidOffset
// until the end of the entry's data has been read past
CPPUNIT_ASSERT_MESSAGE("entry size check" + error_context,
- testEntry.GetLength() == entry->GetSize() ||
- ((m_options & PipeIn) != 0 && entry->GetSize() == wxInvalidOffset));
+ (testEntry.GetLength() == entry->GetSize() ||
+ ((m_options & PipeIn) != 0 && entry->GetSize() == wxInvalidOffset)));
CPPUNIT_ASSERT_MESSAGE(
"arc->GetLength() == entry->GetSize()" + error_context,
arc->GetLength() == entry->GetSize());
diff --git a/tests/archive/archivetest.h b/tests/archive/archivetest.h
index 7a1a306ee0..8e77edff84 100644
--- a/tests/archive/archivetest.h
+++ b/tests/archive/archivetest.h
@@ -14,6 +14,8 @@
#include "wx/archive.h"
#include "wx/wfstream.h"
+#include