mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-12 17:26:13 +00:00
added testcase for issue #187
This commit is contained in:
committed by
Wenzel Jakob
parent
81e0975b82
commit
d2b628bba4
@@ -5,8 +5,10 @@ sys.path.append('.')
|
||||
|
||||
from example.issues import print_cchar, print_char
|
||||
from example.issues import DispatchIssue, dispatch_issue_go
|
||||
from example.issues import Placeholder ,return_vec_of_reference_wrapper
|
||||
from example.issues import Placeholder, return_vec_of_reference_wrapper
|
||||
from example.issues import iterator_passthrough
|
||||
from example.issues import ElementList, ElementA
|
||||
import gc
|
||||
|
||||
print_cchar("const char *")
|
||||
print_char('c')
|
||||
@@ -32,3 +34,11 @@ dispatch_issue_go(b)
|
||||
print(return_vec_of_reference_wrapper(Placeholder(4)))
|
||||
|
||||
print(list(iterator_passthrough(iter([3, 5, 7, 9, 11, 13, 15]))))
|
||||
|
||||
el = ElementList()
|
||||
for i in range(10):
|
||||
el.add(ElementA(i))
|
||||
gc.collect()
|
||||
for i, v in enumerate(el.get()):
|
||||
print("%i==%i, " % (i, v.value()), end='')
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user