Skip to content

Commit 57d7c72

Browse files
committed
Add tests
1 parent 12bfd33 commit 57d7c72

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

integration_tests/bindc_03.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from lpython import (c_p_pointer, CPtr, pointer, i32,
22
Pointer, ccall, p_c_pointer, dataclass,
3-
ccallable, empty_c_void_p)
3+
ccallable, empty_c_void_p, cptr_to_u64,
4+
u64_to_cptr, u64)
45

56
@dataclass
67
class ArrayWrapped:
@@ -51,6 +52,11 @@ def run():
5152
assert a != empty_c_void_p()
5253
array_wrapped.array = a
5354
f(array_wrapped.array)
55+
q: u64 = cptr_to_u64(a)
56+
x: CPtr
57+
x = u64_to_cptr(q)
58+
array_wrapped.array = x
59+
f(array_wrapped.array)
5460
array_wrapped1 = array_wrapped
5561
h(array_wrapped1.array)
5662

0 commit comments

Comments
 (0)