Commit a60e97c2 authored by Stefan Behnel's avatar Stefan Behnel

test case for DEF int constant assignment

parent 8fbd8049
__doc__ = """ __doc__ = """
>>> c() >>> c()
120 120
>>> i() >>> i1() == 42
42 True
>>> i2() == 0x42
True
>>> i3() == 042
True
>>> l() >>> l()
666 666
>>> f() >>> f()
...@@ -23,7 +27,9 @@ DEF TUPLE = (1, 2, "buckle my shoe") ...@@ -23,7 +27,9 @@ DEF TUPLE = (1, 2, "buckle my shoe")
DEF TRUE_FALSE = (True, False) DEF TRUE_FALSE = (True, False)
DEF CHAR = c'x' DEF CHAR = c'x'
DEF INT = 42 DEF INT1 = 42
DEF INT2 = 0x42
DEF INT3 = 042
DEF LONG = 666L DEF LONG = 666L
DEF FLOAT = 12.5 DEF FLOAT = 12.5
DEF STR = "spam" DEF STR = "spam"
...@@ -37,9 +43,19 @@ def c(): ...@@ -37,9 +43,19 @@ def c():
c = CHAR c = CHAR
return c return c
def i(): def i1():
cdef int i
i = INT1
return i
def i2():
cdef int i
i = INT2
return i
def i3():
cdef int i cdef int i
i = INT i = INT3
return i return i
def l(): def l():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment