compile-time DEF test
authorStefan Behnel <scoder@users.berlios.de>
Sat, 16 Feb 2008 16:53:03 +0000 (17:53 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 16 Feb 2008 16:53:03 +0000 (17:53 +0100)
tests/run/compiledef.pyx [new file with mode: 0644]

diff --git a/tests/run/compiledef.pyx b/tests/run/compiledef.pyx
new file mode 100644 (file)
index 0000000..f943df3
--- /dev/null
@@ -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