From: Stefan Behnel Date: Sat, 13 Dec 2008 21:46:31 +0000 (+0100) Subject: initial test for constant folding X-Git-Tag: 0.11-beta~134 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=7f3dda0faccb8f2803486e78260861c8d6208dcc;p=cython.git initial test for constant folding --- diff --git a/tests/run/consts.pyx b/tests/run/consts.pyx new file mode 100644 index 00000000..d9da3437 --- /dev/null +++ b/tests/run/consts.pyx @@ -0,0 +1,12 @@ +__doc__ = u""" +>>> add() +10 +>>> add_var(10) +20 +""" + +def add(): + return 1+2+3+4 + +def add_var(a): + return 1+2 +a+ 3+4