Commit Graph

2644 Commits

Author SHA1 Message Date
Vadim Zeitlin
96ab1f0824 Implement wxCmpNatural() using the native function under macOS
Use [NSStting localizedStandardCompare:] which is supposed to use the
same order as Finder does.
2021-08-25 01:00:24 +02:00
Vadim Zeitlin
9c0b543c04 Rename wxCmpNaturalGeneric() test to its actual name
The name of the test was still using the original function name, update
it to the actually used name.

No real changes.
2021-08-25 00:47:26 +02:00
Vadim Zeitlin
6917f54c4b Merge branch 'ci-msw'
Add CI workflow using MSVS to build wxMSW natively.

See https://github.com/wxWidgets/wxWidgets/pull/2488
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
c868088a49 Add MSVS 2019 solutions for the minimal sample and the tests
It seems inconsistent to have MSVS 2019 solution for the main library
itself, but only MSVS 2017 (and earlier) one(s) for the sample and the
tests, so add MSVS 2019 solution to them too.
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
7f8bd498ce Allow resetting IE emulation level to fail in the tests
Warn about it, but don't fail the test if it fails, as it does this in
the GitHub Actions "windows-2019" environment without any apparent ill
effects.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
37c5f079f1 Disable Direct2D checks failing under Wine
Now that these Direct2D tests are compiled, disable those of them that
fail under Wine due to missing support for Direct2D functionality we use
in Wine implementation.

Don't even give a warning message because there would be too many of
them in these tests, just skip them silently.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
683dfcdfae Use native CATCH macros in wxDir unit test
They provide more information than CppUnit-compatibility ones.
2021-08-22 21:35:14 +02:00
Vadim Zeitlin
3e9d66f925 Remove CppUnit test case class from wxDir unit tests
No real changes, just simplify the code by getting rid of unnecessary
CppUnit boilerplate.
2021-08-22 21:27:20 +02:00
Vadim Zeitlin
cc3c836711 Fix tests build with wxDEBUG_LEVEL==0
Define various macros used in the test code (or in the headers included
from it) as nothing when wxDEBUG_LEVEL==0.

Also don't define a helper function used when asserts are enabled in
this build to avoid clang warnings about unused function.
2021-08-21 15:05:13 +02:00
Vadim Zeitlin
6689feb648 Merge branch 'osx-text-undo'
Implement undo/redo for (multiline) wxTextCtrl in wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/2474
2021-08-20 22:10:48 +02:00
Vadim Zeitlin
1f7cd9c7a4 Merge branch 'generic-initial-state-fixes'
Fixes for the initial state of generic wx{List,Spin}Ctrl.

See https://github.com/wxWidgets/wxWidgets/pull/2469
2021-08-20 21:28:35 +02:00
Vadim Zeitlin
e51971e86c Skip wxTextCtrl::EmptyUndoBuffer() test when using Wine
Wine doesn't provide the OLE interface used by this function, so the
test would always fail when running under it, just skip it instead.
2021-08-20 20:16:11 +01:00
Vadim Zeitlin
64f7c23272 Add unit test for wxTextCtrl::EmptyUndoBuffer()
Check that calling it results in CanUndo() returning false and really
prevents Undo() from working.
2021-08-20 17:00:12 +01:00
Vadim Zeitlin
6f372ad18a Merge branch 'harmonize-info-plist'
Modernize and make consistent all the different Info.plist files in the
repository.

See https://github.com/wxWidgets/wxWidgets/pull/2466
2021-08-17 23:48:14 +02:00
Vadim Zeitlin
5d0b3c1129 Merge branch 'univ_textctrl_fixtest' of https://github.com/Kvaz1r/wxWidgets
Fix multiple problems in wxUniv wxTextCtrl, allowing it to pass more
unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/2447
2021-08-17 23:47:03 +02:00
Vadim Zeitlin
ac1fa83c20 Ensure initial value of generic wxSpinCtrl is always valid
Under MSW creating a wxSpinCtrl with a range of, say, 1..10 and the
default initial value of 0 sets its initial value to 1 (i.e. the closest
valid value) as expected, but the generic version still set it to the
invalid value of 0, which was unexpected, inconsistent and not useful.

Fix the generic version to follow MSW behaviour now and add a test
checking for this.
2021-08-17 23:15:49 +02:00
Vadim Zeitlin
81c4fa449b Use CMake-compatible variable names in configure Info.plist files
This will allow reusing them for CMake as well, and is required in order
to be able to do it as CMake variables names are fixed.
2021-08-15 18:39:34 +02:00
Artur Wieczorek
8ca8c01356 Run all clipping region tests against wxClientDC 2021-08-08 21:54:40 +02:00
Artur Wieczorek
3ca74039da Add test of setting size of the window client area 2021-08-08 21:42:38 +02:00
Kvaz1r
51bc8ede7f Fix Wexpansion-to-defined 2021-08-07 23:58:14 +03:00
Kvaz1r
15c5125572 Refactoring 2021-08-07 22:34:56 +03:00
Kvaz1r
b8d9ac9a32 Revert MSW-specific changes for wxTextCtrl tests in wxUniv 2021-08-07 11:03:03 +03:00
Vadim Zeitlin
ebec1ff9f6 Rebake after removing shaped-ld-sh from bakefile
Simply remove the not existent any longer shared-ld-sh from clean
targets in all makefile.

This should have been done in e663d9af2b (Stop using shared-ld wrapper
script under Mac, 2021-07-06).
2021-08-06 21:51:40 +02:00
Vadim Zeitlin
de2b81b06f Ignore error in another wxWebRequest test under AppVeyor
This is similar to b03eaceea6 (Disable WebRequest::SSL::Ignore unit test
under AppVeyor, 2021-08-04) and just warns about the wxWebRequest
cancelling test failure when running it under AppVeyor instead of
failing the entire test suite, as this does happen sporadically (but
regularly) there for as yet unknown reason.
2021-08-05 23:42:53 +01:00
Vadim Zeitlin
b03eaceea6 Disable WebRequest::SSL::Ignore unit test under AppVeyor
This test sporadically fails in builds with different compilers (both
MSVC and gcc) there for unknown reasons. Until we can find, and fix, the
underlying problem, disable this test to avoid spurious CI failures.
2021-08-04 18:24:28 +02:00
Kvaz1r
335d0bec0c Skip or disable unsupported tests 2021-08-01 11:22:12 +03:00
Vadim Zeitlin
55d57c0f68 Remove another obsolete Borland hdrstop pragma
See f57f214122 (Remove BCC-specific hdrstop pragma from everywhere,
2020-10-12).
2021-08-01 00:43:31 +01:00
Vadim Zeitlin
62c776c17c Merge branch 'regex-pcre'
Implement wxRegEx using PCRE2.

See https://github.com/wxWidgets/wxWidgets/pull/2438
2021-07-27 17:47:31 +02:00
Artur Wieczorek
4e16f01de9 Run all clipping region tests against wxSVGFileDC 2021-07-26 18:51:25 +02:00
Vadim Zeitlin
68a293e75d Skip wxRegEx tests requiring Unicode support if wxUSE_UNICODE=0
There is not much else that can be done if we can't even represent the
contents of the test data properly.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
3415325f4f Add wxRegEx::GetLibraryVersionInfo()
This allows to check the version of PCRE used.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
dbe0950384 Drop WX_NO_REGEX_ADVANCED and always define wxHAS_REGEX_ADVANCED
Using non-PCRE system regex library, which was the only build variant
when wxHAS_REGEX_ADVANCED was not defined, is not supported any more, so
simplify the code by not testing for it.
2021-07-24 19:17:59 +02:00
Vadim Zeitlin
fa59d5700a Implement wxRegEx using PCRE
Adjust the tests and document the incompatibilities with the previously
used regex syntax.

In this commit the use of PCRE is conditional on wxUSE_PCRE which is
never defined as 1 yet, so the new code is still disabled.
2021-07-24 19:17:58 +02:00
Artur Wieczorek
d4dd61800a Skip test known to fail under macOS < 10.13 2021-07-23 18:45:23 +02:00
Vadim Zeitlin
9dbf063a75 Fix ProcessEnter unit tests when running it on its own with wxGTK
Apparently setting focus doesn't work until a mouse click is simulated
to bring up the main test window to the front. This happened implicitly
when running the full test suite, due to e.g. doing it in wxButton unit
tests, which come before wxComboBox::ProcessEnter test, but not when
running just this test (or wxTextCtrl::ProcessEnter) on its own.

Make the test self-contained by simulating a mouse click before
simulating pressing "Enter".
2021-07-22 19:15:50 +02:00
Vadim Zeitlin
e6bac095ca Get rid of CppUnit boilerplate in wxButton unit tests
No real changes, just simplify the code by using CATCH directly.
2021-07-22 19:15:07 +02:00
Artur Wieczorek
c175b31630 Suppress "parameter unused" error in some builds 2021-07-21 07:21:29 +02:00
Artur Wieczorek
42ee966b63 Add tests of clipping region functions for wxDC with transform matrix 2021-07-20 22:56:56 +02:00
Artur Wieczorek
902f4c61a4 Reimplement unit tests for clipping region functions with Catch
Use Catch instead of CppUnit for all unit tests here.
2021-07-20 22:42:02 +02:00
Vadim Zeitlin
304d5e6c59 Merge branch 'regex-prepare-pcre'
Cleanup and simplify wxRegEx code.

See https://github.com/wxWidgets/wxWidgets/pull/2437
2021-07-17 17:13:38 +02:00
Vadim Zeitlin
fa1f7e74ce Merge branch 'deprecate-filename-normalize'
Deprecate wxFilename::Normalize() without flags and add convenient
GetAbsolutePath() to be used instead.

See https://github.com/wxWidgets/wxWidgets/pull/2428
2021-07-17 17:10:40 +02:00
Vadim Zeitlin
f41564a3e2 Add wxRegEx::ConvertFromBasic() helper
This will be used to implement support for BREs using PCRE which doesn't
support them directly in the upcoming commits.
2021-07-15 22:45:29 +02:00
Vadim Zeitlin
020b5f7383 Add simple wxRegEx benchmark
Allow testing speed of some simple regex operations to compare the speed
of the currently used regex library with some other alternatives.
2021-07-15 21:44:28 +02:00
Vadim Zeitlin
8be998861d Use CHECK rather than REQUIRE in individual regex tests
Don't prevent the remaining CheckMatch() tests from running if one of
them fails by using CHECK() rather than REQUIRE().

This is a bit awkward and we probably ought to use sections here
instead, but this change is more minimal.

This commit is best viewed ignoring whitespace-only changes.
2021-07-15 21:44:28 +02:00
Vadim Zeitlin
381cd322ec Always skip the rest of regex tests checking for compile failure
It's useless to continue with testing the given regex if compiling it
has unexpectedly succeeded, all the rest of the tests will fail anyhow.

Also explain that REQUIRE() can't be used here, which is why we need to
use CHECK() and then check the same condition again before returning to
avoid the temptation to "simplify" things.
2021-07-15 21:44:28 +02:00
Vadim Zeitlin
63b4c5ee67 Remove checks for buildbot in the test suite
buildbot is not used since a long time, so don't bother checking for it
in IsAutomaticTest().

This commit is best viewed ignoring whitespace-only changes.
2021-07-15 19:59:11 +02:00
Vadim Zeitlin
9aae8fc81f Remove checks for LXC containers used under Travis CI only
As we don't use Travis CI any longer, we don't need these checks
neither.
2021-07-15 19:55:01 +02:00
Vadim Zeitlin
a370de4caf Remove checks for TRAVIS environments variable from the tests
We don't use Travis CI any more, so this is now unnecessary.
2021-07-15 19:54:29 +02:00
Vadim Zeitlin
7c6f290995 Document wxMulDivInt32() and add a test for it
This function exists since always and is probably already used outside
wx, so make it officially public and add at least a trivial unit test
for it.
2021-07-13 23:05:16 +01:00
Vadim Zeitlin
f37d449208 Add convenient wxFileName::GetAbsolutePath() wrapper and use it
This wrapper simply combines the calls to MakeAbsolute() and
GetFullPath(), but using it results in shorter and more clear code, so
it seems to be worth having.
2021-07-11 14:51:31 +01:00