merge revisions 11877-12162 from trunk to gsoc2009-matevz

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12164 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-07-20 23:35:40 +00:00
commit 25ff4e4927
563 changed files with 22912 additions and 17189 deletions

View file

@ -0,0 +1,3 @@
from constructor_rename import *
x = RenamedConstructor()

View file

@ -11,7 +11,7 @@ if _enums.cvar.enumInstance != 2:
if _enums.cvar.Slap != 10:
raise RuntimeError
if _enums.cvar.My != 11:
if _enums.cvar.Mine != 11:
raise RuntimeError
if _enums.cvar.Thigh != 12:

View file

@ -0,0 +1,9 @@
from funcptr_cpp import *
if call1(ADD_BY_VALUE, 10, 11) != 21:
raise RuntimeError
if call2(ADD_BY_POINTER, 12, 13) != 25:
raise RuntimeError
if call3(ADD_BY_REFERENCE, 14, 15) != 29:
raise RuntimeError

0
Examples/test-suite/python/iadd_runme.py Executable file → Normal file
View file

View file

@ -18,3 +18,17 @@ check(nd)
b = boing(nd)
check(b)
################################
v = VectorIntHolder()
v.push_back(IntHolder(11))
v.push_back(IntHolder(22))
v.push_back(IntHolder(33))
sum = sum(v)
if sum != 66:
raise "sum is wrong"
################################
p = HiddenDestructor.create()

View file

@ -41,3 +41,6 @@ memberPtr = NULLPT
check ("Square area ", 100.0, do_op(s,AREAPT))
check ("Square perim", 40.0, do_op(s,PERIMPT))
check ("Add by value", 3, call1(ADD_BY_VALUE, 1, 2))
check ("Add by pointer", 7, call2(ADD_BY_POINTER, 3, 4))
check ("Add by reference", 11, call3(ADD_BY_REFERENCE, 5, 6))

View file

View file

@ -0,0 +1,36 @@
import threads_exception
t = threads_exception.Test()
try:
t.unknown()
except RuntimeError,e:
pass
try:
t.simple()
except RuntimeError,e:
if e.args[0] != 37:
raise RuntimeError
try:
t.message()
except RuntimeError,e:
if e.args[0] != "I died.":
raise RuntimeError
try:
t.hosed()
except threads_exception.Exc,e:
if e.code != 42:
raise RuntimeError
if e.msg != "Hosed":
raise RuntimeError
for i in range(1,4):
try:
t.multi(i)
except RuntimeError,e:
pass
except threads_exception.Exc,e:
pass

View file

@ -0,0 +1,5 @@
import typemap_delete
r = typemap_delete.Rect(123)
if r.val != 123:
raise RuntimeError

View file

@ -0,0 +1,54 @@
import typemap_qualifier_strip
val = typemap_qualifier_strip.create_int(111)
if typemap_qualifier_strip.testA1(val) != 1234:
raise RuntimeError
if typemap_qualifier_strip.testA2(val) != 1234:
raise RuntimeError
if typemap_qualifier_strip.testA3(val) != 1234:
raise RuntimeError
if typemap_qualifier_strip.testA4(val) != 1234:
raise RuntimeError
if typemap_qualifier_strip.testB1(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testB2(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testB3(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testB4(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testC1(val) != 5678:
raise RuntimeError
if typemap_qualifier_strip.testC2(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testC3(val) != 5678:
raise RuntimeError
if typemap_qualifier_strip.testC4(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testD1(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testD2(val) != 3456:
raise RuntimeError
if typemap_qualifier_strip.testD3(val) != 111:
raise RuntimeError
if typemap_qualifier_strip.testD4(val) != 111:
raise RuntimeError