#1506840 testcase - directors with virtual extended methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9327 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
edd5bfeb1a
commit
e028f34060
2 changed files with 21 additions and 0 deletions
|
|
@ -126,6 +126,7 @@ CPP_TEST_CASES += \
|
||||||
director_default \
|
director_default \
|
||||||
director_enum \
|
director_enum \
|
||||||
director_exception \
|
director_exception \
|
||||||
|
director_extend \
|
||||||
director_frob \
|
director_frob \
|
||||||
director_finalizer \
|
director_finalizer \
|
||||||
director_ignore \
|
director_ignore \
|
||||||
|
|
|
||||||
20
SWIG/Examples/test-suite/python/director_extend_runme.py
Normal file
20
SWIG/Examples/test-suite/python/director_extend_runme.py
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Test case from bug #1506850
|
||||||
|
#"When threading is enabled, the interpreter will infinitely wait on a mutex the second
|
||||||
|
#time this type of extended method is called. Attached is an example
|
||||||
|
#program that waits on the mutex to be unlocked."
|
||||||
|
|
||||||
|
from director_extend import *
|
||||||
|
|
||||||
|
class MyObject(SpObject):
|
||||||
|
def __init__(self):
|
||||||
|
SpObject.__init__(self)
|
||||||
|
return
|
||||||
|
|
||||||
|
def getFoo(self):
|
||||||
|
return 123
|
||||||
|
|
||||||
|
m = MyObject()
|
||||||
|
if m.dummy() != 666:
|
||||||
|
raise RuntimeError, "1st call"
|
||||||
|
if m.dummy() != 666: # Locked system
|
||||||
|
raise RuntimeError, "2nd call"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue