Cython has moved to github.

cython-devel

view tests/run/consts.pyx @ 1622:4f0327bdebc9

test for temp allocation bug in call
author Robert Bradshaw <robertwb@math.washington.edu>
date Sat Jan 17 01:25:34 2009 -0800 (3 years ago)
parents 4d334e9439d8
children da8144d5b27b
line source
1 __doc__ = u"""
2 >>> add() == 1+2+3+4
3 True
4 >>> add_var(10) == 1+2+10+3+4
5 True
6 >>> neg() == -1 -2 - (-3+4)
7 True
8 >>> mul() == 1*60*1000
9 True
10 >>> arithm() == 9*2+3*8/6-10
11 True
12 >>> parameters() == _func(-1 -2, - (-3+4), 1*2*3)
13 True
14 >>> lists() == [1,2,3] + [4,5,6]
15 True
16 """
18 def _func(a,b,c):
19 return a+b+c
21 def add():
22 return 1+2+3+4
24 def add_var(a):
25 return 1+2 +a+ 3+4
27 def neg():
28 return -1 -2 - (-3+4)
30 def mul():
31 return 1*60*1000
33 def arithm():
34 return 9*2+3*8/6-10
36 def parameters():
37 return _func(-1 -2, - (-3+4), 1*2*3)
39 def lists():
40 return [1,2,3] + [4,5,6]