From b8884aaa64fd269c3f87f827df4c37ba0dcc3f8d Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 16 Feb 2008 17:53:03 +0100 Subject: [PATCH] compile-time DEF test --- tests/run/compiledef.pyx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/run/compiledef.pyx diff --git a/tests/run/compiledef.pyx b/tests/run/compiledef.pyx new file mode 100644 index 00000000..f943df3b --- /dev/null +++ b/tests/run/compiledef.pyx @@ -0,0 +1,25 @@ +__doc__ = """ + >>> t + True + >>> f + False + >>> boolexpr + + >>> num6 + 6 + >>> intexpr + 10 +""" + +DEF c_t = True +DEF c_f = False +DEF c_boolexpr = c_t and True and not (c_f or False) + +DEF c_num6 = 2*3 +DEF c_intexpr = c_num6 + 4 + +t = c_t +f = c_f +boolexpr = c_boolexpr +num6 = c_num6 +intexpr = c_intexpr -- 2.26.2