Flesh out tests/compile/cpdef.pyx to test cdef-ed enums, structs, and unions.
authorW. Trevor King <wking@drexel.edu>
Fri, 18 Feb 2011 19:34:28 +0000 (14:34 -0500)
committerW. Trevor King <wking@drexel.edu>
Fri, 18 Feb 2011 19:34:28 +0000 (14:34 -0500)
tests/compile/cpdef.pyx

index 1c3ed5284e19a2f906c3d30049ab7ca6b131e4f2..5db6b3e02bd7bb6be3b8e40baa1368b7620852d1 100644 (file)
@@ -1,6 +1,25 @@
 cdef class A:
+    cdef public int i
+    cdef readonly int j
+    cdef void *ptr
+
     cpdef a(self):
         ma(self)
 
 cpdef ma(x):
     print x
+
+cdef struct S:
+    cdef public int i
+    cdef readonly int j
+    cdef void *ptr
+
+cdef union S:
+    cdef public int i
+    cdef readonly unsigned int j
+    cdef void *ptr
+
+cdef enum E:
+    cdef public i
+    cdef readonly j
+    k