Commit Graph

9 Commits

Author SHA1 Message Date
Vadim Zeitlin
31279195f4 Fix building tests with MSVS 2022 in C++20 mode with /permissive-
Update Catch submodule to include the fix for std::uncaught_exception()
not being available with these compiler options.

Closes #19355.
2022-01-04 23:13:39 +01:00
Vadim Zeitlin
aef263888b Merge latest Catch v1.x branch into our version
There should be no more changes on this branch, and the ones so far are
not very important, but still update to its final version just for
consistency.
2021-12-02 15:11:04 +01:00
Vadim Zeitlin
ac02ae877f Add simple wxBitmapBundle::FromSVG() implementation using NanoSVG
Add nanosvg submodule and use it in the generic implementation of this
function.

This is incomplete yet and, notably, doesn't cache the rasterized
images, but already shows that using SVG images works (at least in the
toolbar sample).
2021-10-05 16:06:43 +01:00
Vadim Zeitlin
56eeb694e7 Fix tests compilation with glibc >= 2.34
Update CATCH submodule to include the workaround for SIGSTKSZ not being
a constant any longer in the latest GNU libc versions.

Closes #19158.
2021-08-05 23:03:20 +02:00
Vadim Zeitlin
966e9cefb5 Add PCRE submodule containing PCRE2 with wx-specific changes
The changes in wx branch make it possible to build PCRE using just the
makefiles, i.e. without configure step.

See README-WX.md in the submodule for more details.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
d91d97dfa9 Update Catch submodule to use correct ARM break instruction
This is required for unit tests under macOS on ARM.
2020-07-01 22:39:13 +02:00
Maarten Bent
27d7dd3f00 Update catch submodule 2018-11-17 19:10:45 +01:00
Jake Nelson
a8671869e5 Fix wxButton::SetBitmapPosition() with GTK+ 3
Make the check for GTK+ >= 2.10 pass for GTK+ 3 too by simply not making
it in this case.

Closes #18004.
2017-11-22 23:23:42 +01:00
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