From b9fafe85dbe1da5e80c7cd655ae1a8802307a986 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 11 Sep 2009 20:00:09 +0200 Subject: [PATCH] extended test cases for public enums --- tests/run/public_enum.pyx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tests/run/public_enum.pyx b/tests/run/public_enum.pyx index f437aab3..db47871f 100644 --- 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? -- 2.26.2