Commit Graph

231 Commits

Author SHA1 Message Date
Vadim Zeitlin
cb5e0d221c Fix running new wxImage::Paste() unit tests from build directory
Add new image test files added in 6e8da8641c (Add alpha blending for
wxImage::Paste, 2020-09-23) and 1f0ade29f0 (Fix using mask colour even
if there is no mask in wxImage::Paste, 2020-09-30) to Makefile, so that
they're copied to the build directory and could be found by the test
there, otherwise running wxImage::Paste test when building outside of
the source directory failed.
2020-10-06 00:37:56 +02:00
Artur Wieczorek
6fac6c0b35 Add unit tests of coordinates conversion functions 2020-09-26 01:43:20 +02:00
Maarten Bent
53a2c8c7fb Rebake after manifest changes 2020-07-31 01:53:43 +02:00
Vadim Zeitlin
d1aa3d5663 Update the version to 3.1.5
This was done by running misc/scripts/inc_release, bakefile_gen and
autoconf.
2020-07-23 16:25:39 +02:00
Arrigo Marchiori
464aeb8f84 avoid using wxNO_IMPLICIT_WXSTRING_ENCODING in utf-8-only builds 2020-07-17 17:52:16 +02:00
Arrigo Marchiori
40d1a3da35 Test building all headers with wxNO_IMPLICIT_WXSTRING_ENCODING
Check that all our public headers compile with this macro defined and
that using a char string without specifying its expected encoding
results in the expected compilation failure in this case.
2020-07-17 17:52:16 +02:00
Vadim Zeitlin
f5001e728c Rebake with bakefile 0.2.12
No real changes, just synchronize with the bakefile release used now.
2020-05-02 17:02:36 +02:00
Vadim Zeitlin
47d881b683 Fix order of -L options in autoconf makefiles
Put linker flags determined by configure after -L$(LIBDIRNAME) option
pointing to the directory containing the libraries being built, to
ensure that we link with these libraries rather than any wx libraries
globally installed in the system, as could be the case since the changes
of ec091c9f2b (Don't override CFLAGS etc in configure-generated
makefile, 2020-02-02).

See #18729.
2020-04-15 02:33:53 +02:00
Vadim Zeitlin
7696fa1bb7 Mark failtest_xxx targets as phony
This doesn't really change anything, but is more correct, as the targets
names don't correspond to any physical files.
2020-03-24 00:01:15 +01:00
Vadim Zeitlin
b9df145b79 Stop using non-existent CXXWARNINGS for failing tests checks
This variable doesn't exist any more, but now it's possible to use
CPPFLAGS directly and get rid of the hack which required it to be used
in the first place.
2020-02-11 23:43:10 +01:00
Vadim Zeitlin
ec091c9f2b Don't override CFLAGS etc in configure-generated makefile
CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS are supposed to be under
user-control and putting configure-determined options in them broke
something as simple as running "make CXXFLAGS=-Wno-some-extra-warning"
because this overrode the CXXFLAGS set by configure and required for
build.

Improve this by using WX_*FLAGS in the generated makefile and leaving
the user-controlled FLAGS alone. This is still not ideal as running
"configure CFLAGS=-DFOO" and then "make CFLAGS=-DBAR" will define both
FOO and BAR, as configure copies CFLAGS to WX_CFLAGS, and so setting it
on make command line won't override it, as it should, but this should be
a much more rare and also much less severe problem, so we should be able
to live with it for now.

Normally this commit shouldn't result in any user-visible changes, i.e.
it shouldn't break any previously working scenarios and only make some
previously broken ones work.
2020-02-11 23:19:31 +01:00
Maarten Bent
bed8cd7b52 Rebake after adding DPI awareness option 2019-11-30 22:52:48 +01:00
Vadim Zeitlin
349e73994b Merge branch 'dpi-awareness-option' of https://github.com/MaartenBent/wxWidgets
Add wxUSE_DPI_AWARE_MANIFEST option allowing to choose to use a manifest
specifying per-monitor DPI awareness.

See https://github.com/wxWidgets/wxWidgets/pull/1622
2019-10-30 21:25:45 +01:00
Maarten Bent
a72c9b6dbc Run autoconf and rebake after adding wxUSE_DPI_AWARE_MANIFEST 2019-10-30 00:02:08 +01:00
Vadim Zeitlin
0a02f4c190 Increment version number to 3.1.4
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.

Also a header for the next version to the change log.
2019-10-28 14:11:00 +01:00
New Pagodi
a4b688cb45 Regenerate the test make files to include the new STC test 2019-03-20 17:07:47 -05:00
Vadim Zeitlin
288d26598c Merge branch 'dvc-var-height'
Optimize generic wxDataViewCtrl performance with variable line heights.

Closes https://github.com/wxWidgets/wxWidgets/pull/1053
2019-01-16 01:25:06 +01:00
ali kettab
36f6f8ad49 wxTextValidator improvements
Improve char inclusion/exclusion support; update the sample to show more
features of this class and add a unit test for it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1093
2019-01-05 23:33:35 +01:00
Sebastian Walderich
e9cbbede00 Implement wxAuiNotebook::GetBestSize()
Compute the best size of the notebook, taking into account all the
different layout possibilities, and add a test checking that this works
as expected.

Closes https://github.com/wxWidgets/wxWidgets/pull/1085
2018-12-23 17:05:09 +01:00
Vadim Zeitlin
b2cdd287bb Resolve change log conflict with master
Reapply the change log change manually to master version of the file to
let the CI builds merge this branch automatically.
2018-12-20 02:24:49 +01:00
Vadim Zeitlin
e1185d8bf0 Increment version number to 3.1.3
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.
2018-12-10 19:06:18 +01:00
jensgoe
d6a137b730 Improve wxDataViewCtrl performance with wxDV_VARIABLE_LINE_HEIGHT
Store the line heights in a cache to make the (generic) wxDataViewCtrl
usable with this style.
2018-12-07 04:05:16 +01:00
Vadim Zeitlin
3ffa651a34 Move wxAdv library contents into wxCore
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.

It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
2018-08-27 21:13:04 +02:00
Artur Wieczorek
fc53007ab4 Add unit test for current point of wxGraphicsPath
Verify that last point is properly positioned after the operations
on wxGraphicsPath.

See #18111.
2018-07-02 20:08:30 +02:00
Vadim Zeitlin
dd92a269c3 Add a simple unit test for wxHtmlPrintout pagination logic
Verify that the number of pages to be printed is as expected.
2018-05-23 18:14:07 +02:00
Vadim Zeitlin
7c34ca65a0 Add unit test for wxLZMA{Input,Output}Stream classes
Create another generic stream test using BaseStreamTestCase framework.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
2ec2837f6d Update version to 3.1.2
Run misc/scripts/inc_release and rebake.
2018-02-20 00:08:01 +01:00
Vadim Zeitlin
036870ab35 Split wxPersistenceManager-related tests and actually build them
It seems better to organize the tests in different files and just
provide a common fixture-like class to reuse functionality.

Also use this as an opportunity to rewrite the tests to use Catch
directly instead of using CppUnit-compatible macros.

Finally, actually build these tests as part of the test suite.
2017-12-15 14:10:35 +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
Vadim Zeitlin
0d394eec9c Update to bakefile 0.2.11 and rebake everything
The main/only change in this version is the removal of automatic rules
using old Carbon Rez/DeRez/SetFile tools.
2017-10-21 17:42:30 +02:00
Artur Wieczorek
2e9e3f5c31 Copy reference images required to execute unit test
Reference images necessary to run a test (see ef46f24f37) have to be copied to the target folder.
2017-04-15 00:13:13 +02:00
Artur Wieczorek
2ecd4a07ba Add unit tests for wxDecToHex() 2017-02-23 20:48:28 +01:00
Artur Wieczorek
fb9cbc0879 Add test suite to check wxGraphicsMatrix operations
Implemented tests of some basic operations like Invert() and Concat().

See #17670.
2016-09-18 23:09:44 +02:00
Vadim Zeitlin
9cb762dbd2 Rebake to get rid of whitespace-only changes in generated files
This just commits insignificant changes after rebaking everything to make sure
they don't get mixed up with significant ones at some later time.
2016-09-08 00:48:06 +02:00
Artur Wieczorek
eb7a9f85c5 Added new tests to check clipping box calculations for wxDC and wxGCDC.
See #17013
2016-06-29 21:01:36 +02:00
David Hart
13068d3603 Strip mnemonics from CJK translations of menu items too
Chinese, Japanese etc translations use a special style for the menu mnemonics
and append them to the translated menu label in brackets, e.g. the menu label
could have the form of "<translation-of-file> (&F)".

Check for this style of mnemonics in wxStripMenuCodes() too and strip them as
well.
2016-06-26 18:36:11 +02:00
Vadim Zeitlin
7eee3576cf Update version to 3.1.1
Update misc/scripts/inc_release script: remove non-existent any more files and
update the version in the MSVS 200x project files not generated by bakefile
any more and MSVS 201x project files which were not previously taken into
account.

Run it and rebake.
2016-03-03 23:23:06 +01:00
Vadim Zeitlin
7e865daa26 Add unit test for wxFlexGridSizer layout logic.
Currently just test that wxEXPAND flag works as expected.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
df13791078 Merge wxQT branch into the trunk.
This merges in the latest sources from GSoC 2014 wxQt project with just a few
minor corrections, mostly undoing wrong changes to common files in that branch
(results of a previous bad merge?) and getting rid of whitespace-only changes.
Also remove debug logging from wxGrid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 01:50:11 +00:00
Vadim Zeitlin
2098cafcad Implement bounding box computations for wxGDDC.
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.

Closes #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 01:34:50 +00:00
Vadim Zeitlin
268b33d8a3 Add simple font tests for the drawing unit test.
Check that DrawText() results in the expected output.

Currently the tests are disabled for non-Windows systems because of the
problem with the reference file paths there.

See #16261.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:29:21 +00:00
Vadim Zeitlin
ba8d58df6c Don't build drawing test plugin in static builds.
Static wxWidgets library can't be used in dynamically loaded plugin, simply
don't build it in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 10:53:55 +00:00
Vadim Zeitlin
9d3921122f Fix drawing test link in static build.
We must use wx_append template which adds the required GUI libraries when
using static versions of wxWidgets libraries and not wx_append_base.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 09:59:10 +00:00
Vadim Zeitlin
0d4ad161d5 Remove support for Win9x from wxMSW.
Most importantly, this allows us to remove all MSLU-related stuff.

Some functions which were previously loaded dynamically can now be just used
directly, too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 02:33:40 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
72aad0d6ea Use the same wxWeakRef implementation for complete and incomplete classes.
This fixes an ODR violation which could arise if wxWeakRef<T> was seen both
when T was an incomplete (e.g. just forward-defined) class and when it was
complete. As different implementations, with different binary layouts, were
used in these two cases, this resulted in fatal run-time problems.

Fix this by always using the slightly less efficient (because storing an extra
pointer) but simpler and safe "dynamic" wxWeakRef implementation.

Also get rid of checks for the ancient compilers such as VC6 and g++ < 3.3,
they are not supported any longer.

Closes #15884.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 00:10:54 +00:00
Vadim Zeitlin
ec7d7f6356 Don't build the drawing test in GUI-less builds.
This test requires GUI parts.

Closes #16145.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-01 22:49:04 +00:00
Vadim Zeitlin
a4568e7c85 Add a new test checking wxGraphicsContext implementation correctness.
This test verifies that the output of wxGraphicsContext on the current system
matches the pregenerated reference output.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:31:21 +00:00
Vadim Zeitlin
4de86c0b26 Update version to 3.1.0.
And regenerate everything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 13:47:05 +00:00
Vadim Zeitlin
910f1a96d2 Add wxOleConvertVariant_ReturnSafeArrays flag for better SAFEARRAY handling.
While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.

Closes #14700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:35 +00:00