projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36c54dd
)
extended test cases for public enums
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 11 Sep 2009 18:00:09 +0000
(20:00 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 11 Sep 2009 18:00:09 +0000
(20:00 +0200)
tests/run/public_enum.pyx
patch
|
blob
|
history
diff --git
a/tests/run/public_enum.pyx
b/tests/run/public_enum.pyx
index f437aab37395713c9ccf83fef772580893412dd7..db47871f9f758a5116543076b12d2cbefa59d588 100644
(file)
--- a/
tests/run/public_enum.pyx
+++ b/
tests/run/public_enum.pyx
@@
-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?