Commit 07159942 authored by Stefan Behnel's avatar Stefan Behnel

test case cleanup, removes some gcc warnings

--HG--
rename : tests/compile/varargdecl.pyx => tests/run/varargdecl.pyx
parent 8755e2ff
...@@ -7,7 +7,7 @@ cdef class Swallow: ...@@ -7,7 +7,7 @@ cdef class Swallow:
pass pass
def f(Grail g): def f(Grail g):
cdef int i cdef int i = 0
cdef Swallow s cdef Swallow s
g = x g = x
x = g x = g
......
def f(a, b): def f(a, b):
cdef int i cdef int i = 5
while a: while a:
x = 1 x = 1
...@@ -23,4 +23,4 @@ def f(a, b): ...@@ -23,4 +23,4 @@ def f(a, b):
x = 1 x = 1
continue continue
x = 2 x = 2
\ No newline at end of file
...@@ -3,3 +3,6 @@ cdef void f() with gil: ...@@ -3,3 +3,6 @@ cdef void f() with gil:
cdef int g(void* x) with gil: cdef int g(void* x) with gil:
pass pass
f()
g("test")
...@@ -6,6 +6,9 @@ __doc__ = u""" ...@@ -6,6 +6,9 @@ __doc__ = u"""
>>> modint(9,2) >>> modint(9,2)
1 1
>>> print modptr()
spameggs
""" """
def modobj(obj2, obj3): def modobj(obj2, obj3):
...@@ -17,11 +20,10 @@ def modint(int int2, int int3): ...@@ -17,11 +20,10 @@ def modint(int int2, int int3):
int1 = int2 % int3 int1 = int2 % int3
return int1 return int1
cdef modptr(): def modptr():
# FIXME!!!
cdef char *str2, *str3 cdef char *str2, *str3
str2 = "spam" str2 = "spam%s"
str3 = "eggs" str3 = "eggs"
obj1 = str2 % str3 obj1 = str2 % str3
return obj1 return obj1.decode(u"ASCII")
__doc__ = u"""
>>> test()
"""
cdef grail(char *blarg, ...): cdef grail(char *blarg, ...):
pass pass
def test():
grail("test")
grail("test", "toast")
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