Permalink
Browse files

Add corner case temp (de)allocation test.

This is as simple as I could get it.
  • Loading branch information...
1 parent 41ab9f0 commit 9ca8c125c2e575a7d7cf1c22b5f909f322228468 @robertwb robertwb committed Oct 30, 2008
Showing with 18 additions and 0 deletions.
  1. +18 −0 tests/run/temps_corner1.pyx
@@ -0,0 +1,18 @@
+__doc__ = """
+ >>> B().coeffs_bitsize()
+ [2]
+"""
+
+cdef class A:
+ def numerator(self):
+ return self
+
+cdef int bitsize(A a):
+ return 1
+
+coeffs = [A()]
+
+class B:
+ def coeffs_bitsize(self):
+ r = [bitsize(c.numerator())+1 for c in coeffs]
+ return r

0 comments on commit 9ca8c12

Please sign in to comment.