Commit bcf510fa authored by Stefan Behnel's avatar Stefan Behnel

extended test case for in/not-in operator

parent e8a2a0bd
......@@ -22,6 +22,21 @@ __doc__ = u"""
1
>>> j([1,3,4])
0
>>> k(1)
1
>>> k(5)
0
>>> m(2)
1
>>> m(5)
0
>>> n('d *')
1
>>> n('xxx')
0
"""
def f(a,b):
......@@ -45,3 +60,11 @@ def j(b):
def k(a):
cdef int result = a in [1,2,3,4]
return result
def m(int a):
cdef int result = a in [1,2,3,4]
return result
def n(a):
cdef int result = a.lower() in ['a *','b *','c *','d *']
return result
......@@ -22,6 +22,21 @@ __doc__ = u"""
0
>>> j([1,3,4])
1
>>> k(1)
0
>>> k(5)
1
>>> m(2)
0
>>> m(5)
1
>>> n('d *')
0
>>> n('xxx')
1
"""
def f(a,b):
......@@ -41,3 +56,15 @@ def j(b):
cdef int result
result = 2 not in b
return result
def k(a):
cdef int result = a not in [1,2,3,4]
return result
def m(int a):
cdef int result = a not in [1,2,3,4]
return result
def n(a):
cdef int result = a.lower() not in ['a *','b *','c *','d *']
return result
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