From: Marcelo M. <mar...@us...> - 2005-10-18 13:24:37
|
Update of /cvsroot/swig/SWIG/Examples/test-suite/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10691/Examples/test-suite/python Modified Files: Makefile.in argcargvtest_runme.py inout.i li_cstring_runme.py li_std_string_runme.py li_std_wstring_runme.py primitive_types_runme.py Added Files: empty_runme.py li_implicit_runme.py Removed Files: implicittest.i implicittest_runme.py Log Message: massive typemap unification --- implicittest_runme.py DELETED --- --- NEW FILE: empty_runme.py --- import empty Index: li_std_wstring_runme.py =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/python/li_std_wstring_runme.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** li_std_wstring_runme.py 1 Nov 2004 23:35:08 -0000 1.2 --- li_std_wstring_runme.py 18 Oct 2005 13:24:14 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- if li_std_wstring.test_wcvalue(x) != x: + print li_std_wstring.test_wcvalue(x) raise RuntimeError, "bad string mapping" Index: li_cstring_runme.py =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/python/li_cstring_runme.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** li_cstring_runme.py 6 Sep 2005 06:31:25 -0000 1.3 --- li_cstring_runme.py 18 Oct 2005 13:24:14 -0000 1.4 *************** *** 12,18 **** --- 12,20 ---- if test3("hello") != "hello-suffix": + print test3("hello") raise RuntimeError if test4("hello") != "hello-suffix": + print test4("hello") raise RuntimeError Index: li_std_string_runme.py =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/python/li_std_string_runme.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** li_std_string_runme.py 1 Dec 2004 01:17:56 -0000 1.3 --- li_std_string_runme.py 18 Oct 2005 13:24:14 -0000 1.4 *************** *** 12,15 **** --- 12,16 ---- if li_std_string.test_value(x) != x: + print x, li_std_string.test_value(x) raise RuntimeError, "bad string mapping" Index: primitive_types_runme.py =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/python/primitive_types_runme.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** primitive_types_runme.py 11 Dec 2004 09:04:27 -0000 1.15 --- primitive_types_runme.py 18 Oct 2005 13:24:14 -0000 1.16 *************** *** 15,20 **** cvar.var_llong = sct_llong cvar.var_ullong = sct_ullong ! #cvar.var_float = sct_float ! #cvar.var_double = sct_double cvar.var_char = sct_char cvar.var_pchar = sct_pchar --- 15,20 ---- cvar.var_llong = sct_llong cvar.var_ullong = sct_ullong ! cvar.var_float = sct_float ! cvar.var_double = sct_double cvar.var_char = sct_char cvar.var_pchar = sct_pchar *************** *** 47,52 **** if cvar.var_llong != cct_llong: pyerror("llong", cvar.var_llong, cct_llong) if cvar.var_ullong != cct_ullong: pyerror("ullong", cvar.var_ullong, cct_ullong) ! #if cvar.var_float != cct_float: pyerror("float", cvar.var_float, cct_float) ! #if cvar.var_double != cct_double: pyerror("double", cvar.var_double, cct_double) if cvar.var_char != cct_char: pyerror("char", cvar.var_char, cct_char) if cvar.var_pchar != cct_pchar: pyerror("pchar", cvar.var_pchar, cct_pchar) --- 47,52 ---- if cvar.var_llong != cct_llong: pyerror("llong", cvar.var_llong, cct_llong) if cvar.var_ullong != cct_ullong: pyerror("ullong", cvar.var_ullong, cct_ullong) ! if cvar.var_float != cct_float: pyerror("float", cvar.var_float, cct_float) ! if cvar.var_double != cct_double: pyerror("double", cvar.var_double, cct_double) if cvar.var_char != cct_char: pyerror("char", cvar.var_char, cct_char) if cvar.var_pchar != cct_pchar: pyerror("pchar", cvar.var_pchar, cct_pchar) *************** *** 129,134 **** p.var_llong = p.stc_llong p.var_ullong = p.stc_ullong ! #p.var_float = p.stc_float ! #p.var_double = p.stc_double p.var_char = p.stc_char p.var_pchar = sct_pchar --- 129,134 ---- p.var_llong = p.stc_llong p.var_ullong = p.stc_ullong ! p.var_float = p.stc_float ! p.var_double = p.stc_double p.var_char = p.stc_char p.var_pchar = sct_pchar *************** *** 157,162 **** t.var_llong = t.stc_llong t.var_ullong = t.stc_ullong ! #t.var_float = t.stc_float ! #t.var_double = t.stc_double t.var_char = t.stc_char t.var_pchar = sct_pchar --- 157,162 ---- t.var_llong = t.stc_llong t.var_ullong = t.stc_ullong ! t.var_float = t.stc_float ! t.var_double = t.stc_double t.var_char = t.stc_char t.var_pchar = sct_pchar *************** *** 216,219 **** --- 216,220 ---- #if cvar.var_namet != '\0\0\0\0\0': if cvar.var_namet != '': + print 'hola', '', cvar.var_namet raise RuntimeError, "bad char '\0' case" *************** *** 302,306 **** t.var_uint = -1 error = 1 ! except TypeError: if a != t.var_uint: error = 1 --- 303,307 ---- t.var_uint = -1 error = 1 ! except OverflowError: if a != t.var_uint: error = 1 Index: argcargvtest_runme.py =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/python/argcargvtest_runme.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** argcargvtest_runme.py 10 Feb 2004 10:02:33 -0000 1.1 --- argcargvtest_runme.py 18 Oct 2005 13:24:14 -0000 1.2 *************** *** 7,10 **** --- 7,11 ---- targs=('hi','hola') if mainv(targs,1) != 'hola': + print mainv(targs,1) raise RuntimeError, "bad main typemap" Index: Makefile.in =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/python/Makefile.in,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Makefile.in 6 Sep 2005 06:22:10 -0000 1.28 --- Makefile.in 18 Oct 2005 13:24:14 -0000 1.29 *************** *** 19,24 **** director_stl \ director_thread \ file_test \ - implicittest \ inout \ input \ --- 19,24 ---- director_stl \ director_thread \ + director_wstring \ file_test \ inout \ input \ *************** *** 27,30 **** --- 27,31 ---- li_cstring \ li_cwstring \ + li_implicit \ li_std_except \ li_std_vectora \ Index: inout.i =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/python/inout.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** inout.i 2 Oct 2004 01:33:38 -0000 1.1 --- inout.i 18 Oct 2005 13:24:14 -0000 1.2 *************** *** 33,36 **** --- 33,40 ---- } + inline void AddOne1r(double& a) { + a += 1; + } + %} *************** *** 42,43 **** --- 46,48 ---- void AddOne2p(std::pair<double, double>* INOUT, double* INOUT); void AddOne3p(double* INOUT, std::pair<double, double>* INOUT, double* INOUT); + void AddOne1r(double& INOUT); --- NEW FILE: li_implicit_runme.py --- from li_implicit import * b = B() ai = A(1) ad = A(2.0) ab = A(b) ai, get(ai) ad, get(ad) ab, get(ab) if get(ai) != get(1): raise RuntimeError,"bad implicit type" if get(ad) != get(2.0): raise RuntimeError,"bad implicit type" if get(ab) != get(b): raise RuntimeError,"bad implicit type" --- implicittest.i DELETED --- |