No real changes, as this doesn't affect this test, but use the new
IsLocal() method instead of comparing the time zone offset with the time
zone, which doesn't work correctly for BST.
wxDateTime timezone-related methods always use the current timezone
offset, while other methods, using CRT, use correct value for the given
date, which may be different.
This discrepancy accounted for test failures in Europe/Minsk time zone
as Belarus has switched from UTC+2 to UTC+3 since 1999 date used in the
test.
It is impossible to really fix the problem easily, so just skip the test
in this case and also mention this bug in the documentation.
See #15370.
Show the loop variable when doing checks inside a loop to make it more
obvious for which test case the failures occur.
Also use CHECK(), instead of REQUIRE(), to which CPPUNIT_ASSERT_EQUAL
expands, to continue with the other loop iterations after failure.
No real changes, just show the variable values if any checks fail and
also continue running the test for the other data points even if one of
them fails.
Don't rely on time zone offset to check whether it is local as this
doesn't, and can't, work for the local time zone in Great Britain which
uses the same offset as UTC, but does use DST, unlike the latter.
Add a unit test (albeit disabled by default) checking that the code that
previously didn't work correctly in BST does work now (run the tests
using "TZ=Europe/London ./test wxDateTime-BST-bugs" under Unix to test).
Closes#14317, #17220.
See #10445.
Replace exactly the same code occurring in both wxDateTime::GetTm() and
Format() with a single version in a new wxTryGetTm() function.
No real changes yet, except for removing of some useless asserts.
This is a tiny optimization (or maybe not so tiny on platforms other
than Linux where time() might not as fast as just reading a memory
location), but mostly is done to work around faketime bug[*] which
prevented it from being used for testing programs using wxWidgets, such
as our own unit tests because time() was called from wxLogTrace() in
wxCSConv::DoCreate() called when creating global conversion objects
during the library initialization.
Arguably, it might be better to avoid calling wxLogTrace() during the
initialization, but this can't be done as simply and this change might
have a small performance benefit too.
[*] https://github.com/wolfcw/libfaketime/issues/132
Subtracting a huge negative offset from the current position could
overflow it, which was correctly detected as undefined behaviour by
UBSAN.
Credit to OSS-Fuzz: this solves its issue 4388.
Although the object being created _will_ be of type wxAppConsole, it
doesn't have this type yet, as wxAppConsole ctor hadn't yet run, and so
the static cast is invalid and detected as such by UBSAN in g++ 6.3.
Currently lzma and jbig libraries are checked only for builtin
libtiff. When the system libtiff is built with lzma and jbig
support and when the `--with-libtiff=sys` flag is specified
the configure script will fail, due to missing linking with
lzma and jbig.
Fixed this by moving lzma and jbig checks from libtiff-builin check
above all libtiff checks. Also added lzma and jbig libs to
EXTRALIBS_GUI.
See https://github.com/wxWidgets/wxWidgets/pull/619
When using ftell to get the position in the file, it should be opened in binary mode.
Regenerate the poem index file with the correct start positions.
Use the wxICON macro for creating the icon, so .ico is used on Windows.
Fix wxFont, wxPen and wxBrush style deprecation warnings.
Add wxFALLTHROUGH to resolve implicit fallthrough warnings in switch statements.
Fix build error when using long for GetTextExtent (with wxUSE_GRID 0).
Remove unused icon from fractal demo.
We need to remove the directory containing sh.exe from the PATH as
otherwise mingw32-make seems to use it and not cmd.exe for executing the
commands in the makefile, but the wrong directory was being removed in
appveyor.yml, having no effect.
Fix this and undo 5f2ccde269 which
compensated for it by (almost) clearing the PATH entirely which, in
turn, broke one of our unit tests (and could break other things in the
future, as having an empty PATH is rather unexpected).
Also use the full path for head program now that its directory is not in
the PATH any more. Alternative could be to use PowerShell, but while
powershell -Command "'gcc','mingw32-make','ar'|%%{ iex \"$_ --version\"|select -first 1 }"
does work, it looks really ugly, so avoid it for now.
See https://github.com/wxWidgets/wxWidgets/pull/142
See #17274.
Apparently a locale can be available at MSW level, so that
wxLocale::IsAvailable() returns true, but not supported by the MSVC CRT,
so that constructing the corresponding wxXLocale fails, which resulted
in wxXLocale unit test failures.
Fix them by checking that wxXLocale can be constructed directly instead
of using wxLocale::IsAvailable() as a proxy.
This is not ideal and perhaps wxLocale::IsAvailable() should check that
the locale is supported in wxXLocale too, but should at least allow unit
tests to pass on AppVeyor for now.
Simplify the test by using a single function instead of all the
machinery inherited from CppUnit.
Also provide more information in case of test failure.
Standard/Unix format strings are intentionally used when using these
compilers/environments (see d62c535d4c for
the former), so don't check for Windows/MSVC format strings in the test.
Allow wxPrintf("%1$s %1$s", "foo") to work.
Take into account the possibility that the number of format specifiers
and the number of actual arguments can be different.
Closes#9367.
There is no need to rebuild everything if only the documentation files
have changed.
Unfortunately there doesn't seem to be any way to do the same thing for
Travis CI yet, see https://github.com/travis-ci/travis-ci/issues/6301