Commit Graph

19 Commits

Author SHA1 Message Date
Vadim Zeitlin
e042c3b582 Don't do anything in WX_ASSERT_FAILS_WITH_ASSERT when wxDEBUG_LEVEL==0.
We can't test for assert failure when using a build of wxWidgets in which
asserts don't exist at all.

Closes #13119.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-05 22:29:58 +00:00
Jouk Jansen
38e5440573 Include compilation of tests for OpenVMS (part1)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-15 09:51:48 +00:00
Vadim Zeitlin
c4cb46c1eb Fix wxUSING_VC_CRT_IO definition in the tests when not using MinGW.
The condition was always true for non-MinGW compilers because of a missing
pair of parentheses, do add them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-03 22:23:57 +00:00
Vadim Zeitlin
43f8864bb0 Use wxUSING_VC_CRT_IO for MSVC CRT-specific test results.
Move USING_VC_CRT into testprec.h to allow its reuse in other files and rename
it to wxUSING_VC_CRT_IO as it only checks whether we're using MSVC STDIO
implementation and could be false even when we are otherwise using MSVC CRT.

Use this symbol for the tests whose result depends on the concrete version of
the CRT we use.

This fixes StringTestCase::FromDouble() failure under MinGW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-03 17:16:00 +00:00
Vadim Zeitlin
12249b199d Run MBConvTestCase::LibcTests() only for MSVC and not other Windows compilers.
This test fails for MinGW, probably because its CRT doesn't use the same
locale names as MSVC CRT. Just disable it for now, as it was already disabled
for non-MSW platforms.

Also use LocaleSetter class (extracted from CLocaleSetter) to change the
locale for this test duration only to avoid affecting any tests running after
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-03 17:15:46 +00:00
Vadim Zeitlin
8cdd00f29f Add a convenient wxREGISTER_UNIT_TEST() macro.
This macro can be used to easily register a test following a standard naming
convention in both the global test suite and the test suite with the same name
as this test instead of having to use 2 different cppunit macros to do the
same thing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:05 +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
Francesco Montorsi
701aa4d804 revert previous revision about localization of decimal points in GetHumanReadableSize() test strings: using CLocaleSetter is a better solution.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-06 18:52:28 +00:00
Vadim Zeitlin
a8f1775855 disable MSVC 8+ warning about using Unicode characters as we do want to use them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:24:57 +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
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
657a8a3598 first round of debug/release merge: introduce wxDEBUG_LEVEL, for now defined as 1 if __WXDEBUG__ is defined, i.e. no real changes; don't use __WXDEBUG__ in the headers to keep debug and release builds ABI-compatible; add functions to customize or disable asserts handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 23:36:37 +00:00
Vadim Zeitlin
9eab67251b forward declare wxEvent before using it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 17:19:16 +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
Michael Wetherell
64e941edd4 We can't define things in someone else's namespace.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-28 12:27:39 +00:00
Vadim Zeitlin
fcca30c7e6 added assertion_traits<> specialization for wxString and convenient CPPUNIT_ASSERT_STR_EQUAL macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-28 15:06:14 +00:00
Vadim Zeitlin
8da7a00a94 enable tests using \u escapes for VC7; replaced compiler version checks for this with wxHAVE_U_ESCAPE defined once and for all in testprec.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-31 17:42:26 +00:00
Ryan Norton
8899b155a1 [ 1068188 ] Precompiled header for the test program [Modified a bit]
Regen bakefiles for unit tests


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-22 05:00:19 +00:00