This allows to immediately see which of the tests failed just looking at
the logs instead of having to check the failure line number manually.
No real changes.
Calling wxMBConvUTF7::ToWChar(..., "+", 1) resulted in reading
uninitialized memory as the decoding code didn't check that there were
any bytes left when switching to the "shifted" mode.
Fix this by explicitly checking for this and returning an error if
nothing is left.
Having NextChar() returning wxEOT only for GetChar() to turn it back to
NUL didn't make any sense, just return NUL directly and get rid of
GetChar/NextChar() distinction.
No real changes, just simplify the code.
This was allowed before, but m_fp became private after the refactoring
of a7dddd9f3b.
Make it protected again now to avoid breaking existing code that
accesses it.
This variable was never used and appears to have been created
accidentally, so just remove it and avoid variable shadowing warnings
from MSVS 2015 when building the sample.
It just doesn't work in the test, so live without it for now.
Also use CHECK() instead of CPPUNIT_ASSERT(), which expands into
REQUIRE(), for independent tests to let later tests to still be done
even if an earlier one fails.
The text and background colours are now stored in the rgba array instead
of fg_color and bg_color as with GTK+ 2 (the latter ones seem to have
been repurposed for the underline and strike-through colours!).
Also make the unit test for this method more robust.
The text control needs a few event loop iterations in order to layout
itself correctly, so give it up to 1 second to do it in order to avoid
spurious test failures that occurred if just a single call to wxYield()
were done (or, worse, none at all as it was the case before).
Also log the value returned by PositionToCoords() in case of test
failures.
While it is added implicitly when running all tests in the order, this
style wasn't used if just this test was ran using "-c PositionToCoords"
option.
Specify wxTE_MULTILINE in it explicitly to allow this to work too.
Change this method to consider the coordinates corresponding to the last
position (i.e. the one beyond the last text character) as valid, for
consistency with wxMSW and to conform to the documented behaviour.
Also give more information about the failures in the corresponding unit
test to make debugging problems with this function simpler.
The code of ziptest and tartest classes still compiled, but actually
didn't do anything during the run-time because makeSuite() method was
never called.
Replace this unused method with DoRunTest() and override runTest() in
the test suite classes to actually run the tests.
Blindly adding 4 to an unsigned length field could result in 0 and this
led to an infinite loop while iterating over all header fields.
Avoid this by promoting the length to int first, before adding 4 to it.
Credit to OSS-Fuzz: this solves its issue 4083.
This is similar to e74fb5effe for wxMSW
and ensures that we don't consider the last position on the first line
invalid in wxGTK neither.
This fixes TextCtrlTestCase::XYToPositionSingleLine() unit test failure.
This was broken by 1c946a469a and resulted
in test failures in OwnerDrawnComboBoxTestCase::TextChangeEvents() unit
test because wxOwnerDrawnComboBox::Clear() used SetValue("") and didn't
generate any events any more.
Fix this regression by explicitly sending an event if we're returning
early and add a unit test explicitly checking that SetValue("") does
generate an event.
The variables and helper TempStringAssign class were added in order to
implement this, but somehow it was never done, so wxGetCurrentTestName()
always returned an empty string.
Fix this and so store the class/method name of the currently running
test in the global variables to give more context, notably for GTK+
errors.
It doesn't really add anything and it's more convenient to specify the
section on the command line (using the "-c" option) if it's just a
single word, without spaces, as it doesn't need to be quoted then.
The warnings are justified as the functions defined by the event table
macros are indeed not used here because we only write them to test that
they compile, but not useful, so suppress them.
This reverts commit 44c91fedb8 which is
not necessary for wxQt any more as wxGraphicsContext is available for it
now and didn't make much sense because wxActivityIndicator just can't be
used without wxGraphicsContext, so a proper fix would be to disable the
former completely if the latter is unavailable.
This fixes a missing include in qt/nonownedwnd.cpp and a missing method
in qt/glcanvas.cpp, allowing the build to complete again. A number of
missing wxOVERRIDE statements were added to reduce the important number of
compiler warnings about those missing labels.