extended test cases for public enums
authorStefan Behnel <scoder@users.berlios.de>
Fri, 11 Sep 2009 18:00:09 +0000 (20:00 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 11 Sep 2009 18:00:09 +0000 (20:00 +0200)
tests/run/public_enum.pyx

index f437aab37395713c9ccf83fef772580893412dd7..db47871f9f758a5116543076b12d2cbefa59d588 100644 (file)
@@ -1,7 +1,24 @@
 __doc__ = u"""
->>> BAR
-3
+>>> BAR == 3
+True
+>>> HONK == 3+2+1
+True
+>>> X == 4*5 + 1
+True
+>>> NONPUBLIC
+Traceback (most recent call last):
+NameError: name 'NONPUBLIC' is not defined
+>>> NOWPUBLIC == 23 + 42
+True
 """
 
+DEF X = 4*5
+
+cdef enum SECRET:
+    NONPUBLIC = 23 + 42
+
 cdef public enum FOO:
     BAR = 3
+    HONK = 3+2+1
+    NOWPUBLIC = NONPUBLIC
+    X = X + 1          # FIXME: should this really work?