Commit f78e4cb8 authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Buffer release test case

parent ce24bec1
...@@ -29,6 +29,11 @@ def testcase(func): ...@@ -29,6 +29,11 @@ def testcase(func):
def testcas(a): def testcas(a):
pass pass
#
# Buffer acquire and release tests
#
@testcase @testcase
def acquire_release(o1, o2): def acquire_release(o1, o2):
""" """
...@@ -290,6 +295,21 @@ def tuple_buffer_assignment2(tup): ...@@ -290,6 +295,21 @@ def tuple_buffer_assignment2(tup):
cdef object[int] x, y cdef object[int] x, y
x, y = tup x, y = tup
@testcase
def explicitly_release_buffer():
"""
>>> explicitly_release_buffer()
acquired A
released A
After release
"""
cdef object[int] x = IntMockBuffer("A", range(10))
x = None
print "After release"
#
# Index bounds checking
#
@testcase @testcase
def get_int_2d(object[int, 2] buf, int i, int j): def get_int_2d(object[int, 2] buf, int i, int j):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment