Commit Graph
275 Commits
Author SHA1 Message Date
Vadim Zeitlin f17abe5883 Use <define> instead of <cxxflags> in the test bakefile
Prefer using more specialized tag.

Regenerate the affected files.
2026-08-06 21:59:34 +02:00
John Paul MattiaandVadim Zeitlin 122ff6d7db Add a multithreaded test for IPC over sockets
Add a test exercising the IPC-over-sockets implementation from a single
thread and from multiple threads concurrently (Execute, Request, Poke,
Advise, combined Advise+Request, and concurrent main-thread and
worker-thread Request()s).

Each test starts its own server by re-executing the test program with
WX_IPC_TEST_SERVER set and shuts it down again in the fixture teardown, so
no server process outlives a test (or disturbs the unrelated GUI tests in
test_gui). The client runs in the main Catch2 process and queries the server
for state to verify it (Catch2 macros cannot run in the server process). The
wait loops are wall-clock bounded so they behave under a GUI event loop, and
a per-fixture watchdog aborts with a diagnostic if a test ever hangs rather
than letting CI time out.

The test runs in both the console "test" and the GUI "test_gui" programs. It
is excluded from one configuration: wxQt, whose event loop does not reliably
process a cross-thread CallAfter() (a wxQt bug fixed separately).
2026-08-06 21:59:34 +02:00
Vadim Zeitlin 5ccdcd6b2a Update version to 3.3.4
Run misc/scripts/inc_release, update version.bkl and rebake.
2026-07-09 15:08:08 +02:00
Blake-MaddenandVadim Zeitlin 4eb22403a5 Remove plugin interface from test_drawing
This was never used and doesn't seem like it ever will be.

Closes #26568.
2026-06-16 00:02:56 +02:00
Blake-MaddenandVadim Zeitlin ee4fbdfb88 Add getters to wxSVGAttributes, add unit tests
Closes #26479.
2026-05-21 22:45:09 +02:00
ihtandVadim Zeitlin f5cb9a66c0 Update wxwidgets.props and common.bkl for VS 2026
This is in line with the changes in a0f5c92b96 and 3d88038d01
2026-05-12 16:29:03 +02:00
Vadim Zeitlin d662d5f6a0 Fix wrong destruction of wxBitmap in wxMSW wxStaticBitmap
Due to a regression introduced in 3e32a9abe1 (Don't bother resetting
wxStaticBitmap image when destroying it, 2025-06-12), which was part
of #25518, the handle of wxBitmap passed to wxStaticBitmap::SetBitmap()
was destroyed when another bitmap was passed to SetBitmap() later.

Fix this by ensuring that we don't overwrite the value of the current
handle (to be deleted) prematurely in DoUpdateImage().

Add a simple unit test for wxStaticBitmap checking that the problem is
really fixed and, under MSW, also that it doesn't leak bitmap handles.

Closes #26106.
2026-01-24 17:02:06 +01:00
RandalphwaandVadim Zeitlin 6228eaf449 Add support for using LunaSVG for SVG rasterization
Optionally use LunaSVG library from the new submodule instead of
NanoSVG.

Closes #25902.
2026-01-18 00:48:57 +01:00
Vadim Zeitlin 29f9d3512a Update version to 3.3.1 and rebake 2025-06-09 22:36:35 +02:00
Blake-MaddenandVadim Zeitlin c1fa7055f6 Fix wxInfoBar buttons regression after custom checkbox addition
Update the functions dealing with buttons to take into account the extra
sizer added in cd07eabd54 (Add support for "Do not show this again"
checkbox to wxInfoBar, 2025-05-12) which broke the existing logic.

See #25394, #25461.

Closes #25489.

Closes #25493.
2025-06-03 03:25:56 +02:00
Maarten Bent fd14294606 Recreate build-files 2025-05-10 18:22:27 +02:00
Maarten Bent d6209abf2d Update and generate build files
Run upmake, bakefile_gen, makeprojects.py, update-setup-h, autogen.
2025-05-10 17:19:29 +02:00
Paul Cornett e7e352d5f4 Handle BMP alpha the same way Windows does
Windows ignores alpha unless the format is 8-bit ARGB, and alpha is not all zeros
2025-02-22 13:48:16 -08:00
Paul Cornett 45a7efd642 Up-scale BMP color components using Windows-compatible method
This allows tests to compare against native behavior under Windows
2025-02-22 13:01:52 -08:00
Vadim Zeitlin 5972730200 Fix logic in wxTextWrapper::Wrap()
The existing code behaved completely wrongly whenever a word longer than
the maximal width was present as it just gave up and didn't wrap
anything at all after it -- when it should have just let this word
overflow but still wrap the rest.

Fix this and add a unit test checking that this works correctly now
(several of the tests would have failed before).

Closes #23339.
2025-01-20 16:24:21 +01:00
Vadim Zeitlin afa366eafb Merge branch 'qt-enter-leave-events' of https://github.com/AliKet/wxWidgets
Fix wxEVT_{ENTER,LEAVE}_WINDOW events generation in wxQt and add a test
for them.

See #24883.
2025-01-08 17:32:30 +01:00
Paul Cornett 05404fd379 Avoid negative shift count with valid BMP file
Detected by undefined behavior sanitizer, on a file with 16 bpp and a color
component of more than 8 bits. Fix by using a different, and more accurate,
method to scale color components to 8 bits.
2024-11-27 18:54:12 -08:00
Paul Cornett 443b64c11c Avoid memory overwrite on malformed BMP with invalid RLE data 2024-11-27 18:54:12 -08:00
Paul Cornett dc83c4ca0e Fix loading ICO files with fully transparent alpha
Windows behavior is to ignore alpha in that case. Broken by b21642b72b
2024-11-19 13:50:33 -08:00
Paul Cornett 738c16a724 Add new test image to build files
Should have been part of b321af212d (Fix loading ICO files with alpha, 2024-11-18)
2024-11-18 17:25:44 -08:00
paulcorandGitHub b21642b72b Fix loading BMP files which use 32bpp but do not have valid alpha (#24939)
Based on the behavior of WIN32 LoadFile(), and the gdk-pixbuf BMP loader source
code, the alpha values are ignored unless the compression method is BI_BITFIELDS.
See #10915, #24219
2024-11-04 19:38:54 -08:00
ali kettab 66090a1487 Added test case to test wxEVT_{ENTER,LEAVE}_WINDOW events 2024-10-19 19:38:16 +01:00
Václav SlavíkandVadim Zeitlin 6711b6f960 Add test for language passthrough in wxTranslations
Explicitly test that wxTranslations will use a language it doesn't
recognize if the OS asks for it and it is available.

See 44c24f12ee (Fix GetPreferredUILanguage() on macOS, 2024-09-09) and
the discussion in #24804.

Closes #24818.
2024-09-20 17:52:46 +02:00
Maarten Bent f0cca189ff Rebake after GDI+ and msimg32 changes 2024-06-22 13:51:39 +02:00
Maarten Bent b27cde84cb Include sample.rc from test.rc
Instead of duplicating most of the file.
2024-03-27 20:13:19 +01:00
Igor KorotandMaarten Bent 03a2dc2866 Implement loading cursor from the resources/Bundle for OSX 2024-03-27 20:12:02 +01:00
Vadim Zeitlin 9a27e206ce Rebake after adding 32-bit ARM support for MSVC
This should have been done in 99bc43cefe (Introduce minimal MSW ARM
support, 2024-01-15).

See #24222.
2024-02-24 20:50:38 +01:00
Václav Slavík 6d48acb5f3 Add unit tests for wxTranslations language lookup 2024-02-13 18:24:43 +01:00
Vadim Zeitlin ec4777bbbf Rebake after the previous commit
This just separates the automatically-generated changes from the manual
ones in the parent commit.
2023-07-29 18:13:29 +02:00
Vadim Zeitlin 994bbe51a7 Link with stc directly in the test bakefile
There doesn't seem any reason not to do it, so do the same thing as is
done in the stc sample and which seems to work there.
2023-07-29 16:01:33 +02:00
Vadim ZeitlinandPB c2e5749443 Fix crash when reading truncated GIF image
Add a unit test case checking that we don't crash any longer and still
read the image meta data correctly, even if not the image itself.

Also add another check for EOF and possibly invalid "bits" value in
another place where we were not checking for it when reading from the
stream.

Closes #23409.

Co-authored-by: PB <PBfordev@gmail.com>
2023-07-02 18:06:03 +01:00
Brian NixonandVadim Zeitlin d78e9fb1cb Correct loading of BI_BITFIELDS bitmaps
This fixes several minor bugs in the loading of `BI_BITFIELDS` bitmaps,
related to handling different header sizes and the colour and alpha
masks.

Closes #23601.
2023-06-03 21:07:40 +02:00
Maarten Bent b0385e498c Rebake after bakefile changes 2023-02-14 22:52:26 +01:00
Artur Wieczorek ec25a5c83c Execute automated tests for wxPropertyGrid
Move existing manually executed tests in propgrid sample to the test
suite executed automatically.
2023-01-30 17:28:17 +01:00
Artur Wieczorek 227cd581f8 Add tests of wxDCClipper 2022-12-29 12:39:27 +01:00
Vadim Zeitlin c78b0d652b Remove UNICODE build option, hardcode its value as 1
Also hardcode "u" suffix for the library names -- it doesn't make sense
any longer, but we need to keep it for compatibility.
2022-10-27 19:43:59 +02:00
Vadim Zeitlin 6e8290a9ce Stop defining _UNICODE in makefiles
This shouldn't be necessary any longer, so don't do it.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin 5c49448c75 Remove bakefile UNICODE_DEFINE variable, always define _UNICODE
It might be unnecessary to define it on command line at all, as it's
done in wx/setup.h, but keep doing it for now.

However stop using a variable for this, as setting wxUSE_UNICODE to 0 is
not supported any longer.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin b2050fcb6f Update to Catch v2
Use Catch2 public header instead of using internal Catch v1 headers: we
can do this now because Catch2 supports (albeit in a rather ugly way)
being used with PCH.
2022-10-18 18:39:13 +02:00
Vadim Zeitlin 7ae3cf206c Remove wxVector unit test
Testing this class doesn't make much sense any more as it's just a
typedef for std::vector and we can presumably rely on the standard class
working as expected.
2022-10-11 00:48:00 +02:00
Vadim Zeitlin af4ad43824 Rebake and rerun autoconf after the version update 2022-07-17 17:03:39 +02:00
Vadim Zeitlin 2a2308d5ed Update version to 3.2.0 and rebake and rerun autoconf
Update all make/project files to use 3.2.0.
2022-06-21 00:54:26 +02:00
Vadim Zeitlin 3c25afaec4 Remove wx.ico from test bakefile and makefiles
This should have been done in 2373b4ca24 (Construct the test bitmaps
directly in wxImageList test code, 2022-05-18) but was forgotten there.
2022-06-09 01:01:06 +02:00
Vadim Zeitlin 3ffc739e0e Only read BMP pixel data from stream in LoadBMPData()
This makes the code much more clear: LoadDib() now reads all the header
data while LoadBMPData() reads bitmap data only and doesn't read any
header values any more, unlike before.

It also allows not to have to pass neither bmpOffset nor IsBmp
parameters to LoadBMPData(), making its argument list much more
reasonable.

Finally, and, most importantly, it fixes loading bitmaps using
BI_BITFIELDS that was broken back in cccda9ef6b (Fix loading colour
palette from BMP file, 2019-12-28).

This commit also adds a unit test checking that this doesn't get broken
again without anyone noticing.

See #18634.

Closes #22499.
2022-06-08 23:49:18 +01:00
Vadim Zeitlin 5d5591816d Update to bakefile 0.2.13 to fix DLL directory creation
Fix the bug introduced in ec0734f96f (Install DLLs in bindir, not
libdir, when using MSW toolchains, 2021-01-09): the directory where the
DLLs were installed wasn't created any more, resulting in errors if it
didn't exist.

Update to latest bakefile version adding the missing mkdir command to
fix this and also use a released bakefile version for the wx makefiles.

Regenerate configure to match the new version.

See #14601.
2022-04-23 23:11:31 +02:00
Vadim Zeitlin 559ea66e55 Use DPI aware manifests for MSVS 2022 too 2021-12-18 13:22:59 +01:00
Vadim Zeitlin 5d6b2f6704 Rebake after parent commit changes 2021-12-17 21:29:49 +01:00
Vadim Zeitlin 1e683c1401 Rename testdata.fc to testdata.conf
No real changes, just use a more clear and longer (which will be
important for the next commit) name for a test file.

Remove the non-existing samples/console/testdata.gc from make_dist.mk
(there are other non-existing files still referenced there).
2021-12-10 17:26:49 +01:00
Vadim Zeitlin 8adfaa37f7 Add wxBitmapBundle::FromSVGFile() helper
This is just a trivial wrapper for wxBitmapBundle::FromSVG(), but it can
still be convenient to have.
2021-11-29 12:55:22 +00:00
Vadim Zeitlin 5efcaf4e59 Fix copying testdata.fc file to the tests build directory
This file was listed in test.bkl but wasn't actually copied because the
value of <files> was overwritten by another <files> just below ever
since the changes of 21fe35aff7 (add wxImage test units to test loading
from both seekable and non-seekable streams, 2009-06-01).

Fix this by splitting this wx-data into 2 different ones, to avoid this
conflict.
2021-11-28 22:16:12 +01:00