Commit Graph

62 Commits

Author SHA1 Message Date
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
e77dc839af Use normal event loop in GUI test program.
Don't create an event loop manually, let the port-specific code do it and run
it as usual in the GUI unit tests.

This has several advantages:
 - No need to manage the event loop manually in the test.
 - No need for Mac-specific code in the test itself.
 - Code being tested runs in the same context as in a normal GUI program,
   which is especially important for event-loop related tests under wxOSX as
   the main event loop is special there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:25:46 +00:00
Stefan Csomor
234e255639 wait for the frame window to be really done on OSX before starting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 00:15:59 +00:00
Vadim Zeitlin
92318ee1fd Recognize "sandbox" user as indicating automatic testing.
The buildbot slaves actually use "sandbox" as the user name, not "buildbot",
so test for the former instead for the latter, see r73963.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 19:19:43 +00:00
Vadim Zeitlin
6524d302d0 Recognize "buildbot" user in IsAutomaticTest() too.
Some build slaves apparently run under "buildbot" user and not "buildslave",
recognize them as running automatic tests too.

Also show the name of the current system and user on startup to avoid such
guess work in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 19:21:42 +00:00
Vadim Zeitlin
7582edfbf9 Fix wxLocale::GetInfo() in C locale under Windows.
Don't use LOCALE_USER_DEFAULT when the locale hadn't been changed because the
user default locale often (and maybe even always) is different from "C" locale
used by the CRT resulting in mismatch between the conventions used by
wxDateTime::Format(), which uses the CRT locale, and wxDateTime::Parse(),
which uses Windows format. Instead use the hard-coded values corresponding to
the "C" locale to ensure we use the same values as the CRT in this case.

This also reverts r73244 which was applies to make the unit tests pass before
this fix as it's not necessary any longer.

Closes #14918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-29 21:53:13 +00:00
Vadim Zeitlin
9de31412ed Add a temporary workaround to make the tests pass.
Call SetCLocale() on tests startup to avoid problems with wxDateTime parsing
that happen when the user locale is different from "C" one under Windows.

See #14918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-22 02:35:07 +00:00
Vadim Zeitlin
c66bfe457c Show some information about the environment in the unit tests.
For now just show the system description and the locale, this should already
be helpful for diagnosing some test failures.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 23:14:01 +00:00
Vadim Zeitlin
d01ec0965c No changes, just suppress an unused variable warning.
Omit the name of the exception object that we never use.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-30 23:41:33 +00:00
Vadim Zeitlin
f1287154cd Add IsAutomaticTest() function to the unit tests.
This allows to easily test if we're running on a buildbot slave and disable
some difficult to debug test failures there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 16:21:06 +00:00
Vadim Zeitlin
e84d989930 Use printf() instead of wxPrintf() in cppunit details listener.
Wide char output from wxPrintf() didn't appear at all under Linux because
stdout was switched into narrow stream mode by GNU libc due to initial use of
cout in the test.

Use printf() instead of wxPrintf() as we are only printing ASCII strings
anyhow. Of course, this is not a real fix but at least we can see the tests
results like this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 16:21:03 +00:00
Vadim Zeitlin
b57655127d Improve error reporting for nested asserts failures in the test suite.
If an assert occurred while handling an exception generated by a previous
assert handler, the information about the original assert was lost even if
though it was more important than the secondary assert. Do preserve and show
the original assert message in this case now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-29 23:22:08 +00:00
Vadim Zeitlin
bb5a951418 Use __WINDOWS__ for OS checks and __WXMSW__ for GUI checks (round 2).
This is continuation of r70796 and serves the same purpose.

Closes #14065, #14066.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 20:31:42 +00:00
Michael Wetherell
0dffa8059d Change the return code of the test program so that aborting a test with an
exception doesn't count as a failure, to provide a way to skip tests that
can't be performed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 22:15:07 +00:00
Vadim Zeitlin
33f7fa342f Don't throw assert failure exception in the test suite if it's unsafe.
Don't throw when already handling an exception as it would result in a call to
terminate() and no useful information about the test failure would be given.
Abort ourselves instead to at least give the message about the assert failure.

This should help debug the mysterious ListCtrlTestCase failures in buildbot
wxGTK builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-04 10:53:37 +00:00
Vadim Zeitlin
6222ad281a Fix timing format string in the test suite.
wxStopWatch::Time() returns a long value so use %ld, not %d.

This fixes assert failure when using "-t" option with the test suite under 64
bit Unix architectures.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-04 10:41:44 +00:00
Vadim Zeitlin
232fdc630c Merge the new GUI tests from SOC2010_GUI_TEST branch.
Add a lot of tests for many wx GUI classes.

Add tests using the new wxUIActionSimulator class but disable them under OS X
as too many of them currently fail there.

Refactor the test suite to make organizing the existing tests and adding the
new ones easier.

Improve documentation using the information gathered while testing the
classes. Also update the documentation of the testing system itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:16:05 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +00:00
Francesco Montorsi
20ba398d1a disable FTPTestCase by default.
Add a warning for the user when running --list without arguments: not all tests are listed, only those enabled by default (e.g. FTPTestCase doesn't appear there)!


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 10:49:44 +00:00
Vadim Zeitlin
884ca4e484 Abort on asserts in worker threads.
Throwing an exception from worker threads is useless as it is not caught by
our wxUnitTestProtector which only protects the main thread, so abort
immediately to be sure to provide at least some information about the problem
as otherwise nothing may be output at all and the program can end up
deadlocked.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-21 14:45:37 +00:00
Vadim Zeitlin
de83091077 disable warnings about unused parameters in CppUnit headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:22:37 +00:00
Francesco Montorsi
5b105c6ff3 use a smaller timeout value to avoid blocking buildslaves for 10minutes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 14:55:22 +00:00
Francesco Montorsi
9e91447ca4 minor change: differentiate the initial banner of test.exe from test_gui.exe
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 14:46:44 +00:00
Francesco Montorsi
1f51673bb8 add wxURL::GetInputStream test unit; add a global IsNetworkAvailable() utility to the test units
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 11:30:50 +00:00
Stefan Csomor
8b7b1a5748 guaranteeing autorelease pools for overridden OnRun on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-14 19:54:01 +00:00
Vadim Zeitlin
e992b97f1b avoid the ugly hack with adding an empty string to m_registries to indicate that we need to run all tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 16:38:20 +00:00
Vadim Zeitlin
ad16130f66 add possibility to choose the locale (useful for Windows which doesn't honour LC_ALL &c)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 15:31:57 +00:00
Vadim Zeitlin
d73a520945 allow running tests whose names don't end with TestCase again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-30 22:18:24 +00:00
Vadim Zeitlin
62714742f3 no changes, just some cleanup (use compile-time asserts instead of run-time ones; use "FAIL" instead of "F")
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 15:35:30 +00:00
Vadim Zeitlin
875f82b1b6 switch off logging sooner (closes #10646)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 15:31:54 +00:00
Vadim Zeitlin
92f8206fee remove unused variable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 13:46:22 +00:00
Vadim Zeitlin
29e0c68ef5 produce a better looking report with --time option (closes #10643)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 16:28:20 +00:00
Vadim Zeitlin
9912799caf don't log std::exceptions ourselves, let cppunit do it as it outputs more details
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 13:32:19 +00:00
Vadim Zeitlin
b33e98f0bd trap CRT assertions and report assertions which happen inside CppUnit tests in a better way
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 10:42:11 +00:00
Vadim Zeitlin
6582f59207 compilation fix for wxUSE_STD_STRING==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 16:10:09 +00:00
Francesco Montorsi
1dd8319ab9 revert 59680; implement proper fix for wxMSW test failure detection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 12:28:52 +00:00
Francesco Montorsi
d24a0a3a30 try to use 0/1 instead of the cstdlib' EXIT_SUCCESS/FAILURE constants to see if buildbot makes red the currently-green boxes relative to wxMSW test runs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 00:16:43 +00:00
Francesco Montorsi
6d423df049 allow to give the testcase name without the final 'TestCase' postfix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 00:06:32 +00:00
Vadim Zeitlin
1649d2886b add a unit test checking that events are really propagated as they're supposed to
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 16:21:50 +00:00
Vadim Zeitlin
0468a58a4b don't show assert message boxes in debug build but throw an exception if an assert unexpectedly fails; do check that expected asserts are generated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 02:28:55 +00:00
Vadim Zeitlin
6d9407fec4 fix compilation with cppunit 1.9 (which doesn't have stdCOut()) and some harmless warnings (which probably were fixed in newer cppunit version too)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-18 15:51:09 +00:00
Vadim Zeitlin
afd9046882 add command line options for displaying the test name and time taken by them (closes #10156)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-05 10:08:19 +00:00
Vadim Zeitlin
2976d6cbc0 unbuffer cout to work around bug in Debian version of cppunit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-27 20:37:44 +00:00
Vadim Zeitlin
9f10e7c758 no changes, just removed an unnecessary semicolon at top level
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-19 15:36:39 +00:00
Vadim Zeitlin
05b5a45f96 don't run vsnprintf() test if we're using the system version, there is nothing we can do about its failures then anyhow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-30 22:11:51 +00:00
Vadim Zeitlin
5098c258b2 compilation fixes for VC6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-13 01:13:03 +00:00
Vadim Zeitlin
c0d9b217a7 added unit test for some of wxTextCtrl methods and its events generation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-26 00:28:31 +00:00
Vadim Zeitlin
aa3b041ed7 fix wxCmdLineEntryDesc compilation after latest changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-14 23:26:06 +00:00
Václav Slavík
1f25eb3aa9 compilation fix after wxCmdLineEntryDesc changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-10 22:13:05 +00:00
Vadim Zeitlin
9f7a07ab9f warn if wxVsnprintf() is not being used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-11 02:27:29 +00:00