From: Dag Sverre Seljebotn Date: Sat, 19 Jul 2008 20:45:07 +0000 (+0200) Subject: Testcase for cdef assignments X-Git-Tag: 0.9.8.1~49^2~90 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=050a5310d636637a61098f07e56df27a199f2899;p=cython.git Testcase for cdef assignments --- diff --git a/tests/run/cdefassign.pyx b/tests/run/cdefassign.pyx new file mode 100644 index 00000000..79dc3453 --- /dev/null +++ b/tests/run/cdefassign.pyx @@ -0,0 +1,15 @@ + +__doc__ = """ + >>> test(1, 2) + 4 1 2 2 0 +""" + +def test(x, int y): + if True: + before = 0 + cdef int a = 4, b = x, c = y, *p = &y + print a, b, c, p[0], before + +# Also test that pruning cdefs doesn't hurt +def empty(): + cdef int i