Commit 5270e035 authored by Stefan Behnel's avatar Stefan Behnel

extended test cases for for-loop and list comp

parent aa2cc986
__doc__ = u"""
>>> smoketest()
[0, 4, 8]
>>> int_runvar()
[0, 4, 8]
>>> typed()
[A, A, A]
>>> iterdict()
......@@ -10,6 +12,10 @@ __doc__ = u"""
def smoketest():
print [x*2 for x in range(5) if x % 2 == 0]
def int_runvar():
cdef int x
print [x*2 for x in range(5) if x % 2 == 0]
cdef class A:
def __repr__(self): return u"A"
......
......@@ -12,6 +12,9 @@ __doc__ = u"""
Spam!
Spam!
Spam!
>>> go_c_int(1,5)
Spam!
Spam!
>>> go_c_all()
Spam!
Spam!
......@@ -74,6 +77,11 @@ def go_c():
for i in range(4):
print u"Spam!"
def go_c_int(int a, int b):
cdef int i
for i in range(a,b,2):
print u"Spam!"
def go_c_all():
cdef int i
for i in range(8,2,-2):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment