Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
22e13080
Commit
22e13080
authored
Jan 02, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loads of test cases
parent
b4c9ca28
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
7 deletions
+44
-7
tests/compile/altet1.pyx
tests/compile/altet1.pyx
+10
-0
tests/compile/hinsen1.pyx
tests/compile/hinsen1.pyx
+11
-1
tests/compile/nogil.pyx
tests/compile/nogil.pyx
+1
-1
tests/run/backquote.pyx
tests/run/backquote.pyx
+15
-2
tests/run/powop.pyx
tests/run/powop.pyx
+2
-2
tests/run/sizeof.pyx
tests/run/sizeof.pyx
+5
-1
No files found.
tests/compile/altet1.pyx
View file @
22e13080
__doc__
=
"""
>>> flub(25)
25
>>> g()
0
"""
cdef
extern
from
"altet1.h"
:
ctypedef
int
blarg
...
...
@@ -7,3 +14,6 @@ def flub(blarg bobble):
print
bobble
globvar
=
0
def
g
():
return
globvar
tests/compile/hinsen1.pyx
View file @
22e13080
__doc__
=
"""
>>> test()
1
"""
cdef
extern
from
"hinsen1.h"
:
ctypedef
class
spam
.
Spam
[
object
PySpamObject
]:
...
...
@@ -7,4 +12,9 @@ cdef extern from "hinsen1.h":
cdef
class
SpamAndEggs
(
Spam
):
cdef
cook
(
self
):
pass
return
1
def
test
():
cdef
SpamAndEggs
s
s
=
SpamAndEggs
()
return
s
.
cook
()
tests/compile/nogil.pyx
View file @
22e13080
cdef
extern
object
g
(
int
x
)
nogil
cdef
extern
void
g
(
int
x
)
nogil
cdef
void
f
(
int
x
)
nogil
:
cdef
int
y
...
...
tests/run/backquote.pyx
View file @
22e13080
def
f
(
obj1
,
obj2
):
__doc__
=
"""
>>> f(20)
'20'
>>> f('test')
"'test'"
>>> g()
'42'
"""
def
f
(
obj2
):
obj1
=
`obj2`
return
obj1
def
g
():
obj1
=
`42`
\ No newline at end of file
return
obj1
tests/run/powop.pyx
View file @
22e13080
...
...
@@ -2,8 +2,8 @@ __doc__ = """
>>> f(1.0, 2.95)[0] == f(1.0, 2.95)[1]
True
>>> constant_py()
1024L
>>> constant_py()
== 2L ** 10
True
>>> constant_long() == 2L ** 36
True
...
...
tests/run/sizeof.pyx
View file @
22e13080
__doc__
=
"""
>>> f()
"""
cdef
struct
Spam
:
char
*
grail
cdef
void
f
():
def
f
():
cdef
int
i
,
j
,
k
cdef
char
*
p
i
=
sizeof
(
p
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment