wxWidgets/tests
Vadim Zeitlin f3ff831f3b Changes to template Connect() to make it compile with MSVC7 and possible other
not quite up-to-date compilers, to reduce repetitions and to allow using
methods of non-wxEvtHandler-derived classes as event callbacks:

1. Don't rely on compiler ability to deduce template parameter from the type
   of a parameter of a function used as another template parameter, at least
   MSVC7 can't do this and it's probably not the only one.
2. Do rely on compiler support for partial specialization to make
   wxEventFunctorMethod compile for non-wxEvtHandler-derived handlers while
   still keeping the old functionality for the wxEvtHandler-derived ones.
3. Don't make any difference between functions and functors, both are callable
   objects so use them as such, this allows to fold code for both cases.
4. Avoid the use of dynamic_cast<>.
5. Several naming changes:
 a) wxTypedEventType -> wxEventTypeTag (because this is what it is)
 b) Subscribe/Unsubscribe -> DoConnect/Disconnect (to follow the usual
    convention of public Foo calling private DoFoo and to avoid using up
    another name)
 c) Derived -> ObjClass (because it's not clear what does Derived mean)
6. Extend the unit test to cover more cases.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-02 20:38:56 +00:00
..
archive minor icc warning fixes 2008-11-19 09:55:27 +00:00
arrays no need to disable DoTestSwap() for VC6 any more with latest wx/cppunit.h 2008-11-22 14:33:09 +00:00
base64 get rid of special WX_ASSERT_FOO_EQUAL macros by defining CppUnit::assertEquals() overloads for wx types 2008-07-18 23:07:23 +00:00
benchmarks link with wininet.lib under Windows to avoid linking errors in wxUSE_URL_NATIVE==1 build (#10338) 2009-01-15 13:33:51 +00:00
cmdline already escaped backslash shouldn't escape the following quote in ConvertStringToArgs() 2008-07-19 01:53:04 +00:00
config define wxHAS_CONFIG_TEMPLATE_RW if template wxConfig::Read/Write() are available; use it to exclude the calls to these functions from the test to fix VC6 compilation 2008-11-03 13:36:08 +00:00
controls implement wxTreeCtrl::ItemHasChildren() properly for virtual root item; added unit test for it 2009-01-17 13:16:25 +00:00
datetime correct wxDateTime DST begin/end computations for years > 2006 in USA (closes #10425) 2009-01-28 21:52:37 +00:00
events Changes to template Connect() to make it compile with MSVC7 and possible other 2009-02-02 20:38:56 +00:00
filekind Compilation fix 2005-04-25 10:32:55 +00:00
filename disable warning about using deprecated wxStripExtension() for MSVC 2009-02-01 22:20:59 +00:00
filesys [ 1068188 ] Precompiled header for the test program [Modified a bit] 2004-11-22 05:00:19 +00:00
fontmap get rid of special WX_ASSERT_FOO_EQUAL macros by defining CppUnit::assertEquals() overloads for wx types 2008-07-18 23:07:23 +00:00
formatconverter fix test failures: the expected results were incorrect, UTF-8 build uses %lc for characters and not %s 2008-05-30 23:38:13 +00:00
geometry compilation fixes for VC6 2008-01-13 01:13:03 +00:00
hashes define {first,second}_type in the struct declared by _WX_DECLARE_PAIR too for compatibility with std::pair, we can avoid #ifdefs in the code using the hash then (#9725) 2008-07-13 18:20:06 +00:00
html added a test to check if wxHtmlWindow::SelectionToText() inserts \n characters correctly 2008-10-15 15:55:25 +00:00
image fix a bug in the test which was corrupting 1 byte beyond wxImage buffer 2008-07-23 23:23:23 +00:00
intl get rid of special WX_ASSERT_FOO_EQUAL macros by defining CppUnit::assertEquals() overloads for wx types 2008-07-18 23:07:23 +00:00
lists replace CPPUNIT_ASSERTs with CPPUNIT_ASSERT_EQUALs 2008-12-17 09:47:39 +00:00
longlong minor icc warning fixes 2008-11-19 09:55:27 +00:00
mbconv minor icc warning fixes 2008-11-19 09:55:27 +00:00
misc fix for the broken VC6 compiler (why do we have to still support it?) 2009-01-11 10:28:20 +00:00
net compilation fixes for 64 bit platforms 2009-01-16 17:41:25 +00:00
regex minor icc warning fixes 2008-11-19 09:55:27 +00:00
scopeguard get rid of special WX_ASSERT_FOO_EQUAL macros by defining CppUnit::assertEquals() overloads for wx types 2008-07-18 23:07:23 +00:00
streams compilation fixes for 64 bit platforms 2009-01-16 17:41:25 +00:00
strings calling wcsnlen(NULL) does crash (under Debian and, according to the docs, should also crash with MSVC), contrary to what the comment claimed so don't do this 2009-01-16 17:48:59 +00:00
textfile minor icc warning fixes 2008-11-19 09:55:27 +00:00
thread chanegd wxTlsValue to be pointer-like instead of value-like which doesn't work for UDTs; use __thread keyword with mingw32 >= 4.3 too; use library-based thread-specific variables support in wxString cache now that it is fixed to work there; finally added a unit test for TLS stuff 2008-08-29 23:28:42 +00:00
uris fix wxURI::GetUser() for URIs without password; added unit test case for it (closes #10412) 2009-01-21 17:02:11 +00:00
vectors added wxVector::resize() 2008-12-11 13:45:04 +00:00
weakref remove the test of weak references classes size, it's implementation-dependent 2008-01-16 02:03:10 +00:00
window don't take the min size into account when setting the window size explicitly in wxGTK, just as wxMSW doesn't do it; mention this in the docs and added a unit test to enforce this 2008-05-25 03:08:31 +00:00
xlocale use hex escapes instead of 8 bit characaters (#10105) 2008-10-23 13:08:02 +00:00
xml fix C strings comparison in LoadSave() test in STL build 2008-10-10 21:12:51 +00:00
dummy.cpp Empty line at the end. 2004-11-22 15:12:29 +00:00
makefile.bcc move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
makefile.gcc move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
Makefile.in move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
makefile.vc move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
makefile.wat move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_printfbench.dsp link with wininet.lib under Windows to avoid linking errors in wxUSE_URL_NATIVE==1 build (#10338) 2009-01-15 13:33:51 +00:00
test_test_gui.dsp move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_test.dsp move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_vc7_printfbench.vcproj link with wininet.lib under Windows to avoid linking errors in wxUSE_URL_NATIVE==1 build (#10338) 2009-01-15 13:33:51 +00:00
test_vc7_test_gui.vcproj move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_vc7_test.vcproj move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_vc8_printfbench.vcproj link with wininet.lib under Windows to avoid linking errors in wxUSE_URL_NATIVE==1 build (#10338) 2009-01-15 13:33:51 +00:00
test_vc8_test_gui.vcproj move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_vc8_test.vcproj move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_vc9_printfbench.vcproj link with wininet.lib under Windows to avoid linking errors in wxUSE_URL_NATIVE==1 build (#10338) 2009-01-15 13:33:51 +00:00
test_vc9_test_gui.vcproj move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_vc9_test.vcproj move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test_vc9.sln add VC9 project files (closes #9960) 2008-10-08 16:42:00 +00:00
test.bkl move evthandler.cpp to non-GUI test as it doesn't require the GUI 2009-02-01 23:20:27 +00:00
test.cpp add a unit test checking that events are really propagated as they're supposed to 2009-01-16 16:21:50 +00:00
testdata.fc moved Unicode tests to testsuite (patch 943945) 2004-04-30 20:26:14 +00:00
testprec.h forward declare wxEvent before using it 2009-01-16 17:19:16 +00:00