From 050a5310d636637a61098f07e56df27a199f2899 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Sat, 19 Jul 2008 22:45:07 +0200 Subject: [PATCH] Testcase for cdef assignments --- tests/run/cdefassign.pyx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/run/cdefassign.pyx 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 -- 2.26.2