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
Boxiang Sun
cython
Commits
39746182
Commit
39746182
authored
Jun 11, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new test cases from Pyrex
parent
725b6f96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
0 deletions
+63
-0
tests/errors/e_badexcvaltype.pyx
tests/errors/e_badexcvaltype.pyx
+6
-0
tests/errors/e_badfuncargtype.pyx
tests/errors/e_badfuncargtype.pyx
+12
-0
tests/errors/e_badpyparam.pyx
tests/errors/e_badpyparam.pyx
+7
-0
tests/errors/e_badtypeuse.pyx
tests/errors/e_badtypeuse.pyx
+38
-0
No files found.
tests/errors/e_badexcvaltype.pyx
0 → 100644
View file @
39746182
cdef
char
*
spam
()
except
-
1
:
pass
_ERRORS
=
u"""
1:26: Exception value incompatible with function return type
"""
tests/errors/e_badfuncargtype.pyx
0 → 100644
View file @
39746182
cdef
struct
Spam
cdef
extern
int
spam
(
void
)
# function argument cannot be void
cdef
extern
int
grail
(
int
i
,
void
v
)
# function argument cannot be void
cdef
int
tomato
(
Spam
s
):
# incomplete type
pass
_ERRORS
=
u"""
3:21: Use spam() rather than spam(void) to declare a function with no arguments.
4:29: Use spam() rather than spam(void) to declare a function with no arguments.
5:16: Argument type 'Spam' is incomplete
"""
tests/errors/e_badpyparam.pyx
0 → 100644
View file @
39746182
cdef
struct
Foo
def
f
(
Foo
*
p
):
pass
_ERRORS
=
u"""
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_badpyparam.pyx:3:6: Cannot convert Python object argument to type 'Foo *'
"""
tests/errors/e_badtypeuse.pyx
0 → 100644
View file @
39746182
cdef
struct
Grail
cdef
extern
object
xobj
# Python object cannot be extern
cdef
object
aobj
[
42
]
# array element cannot be Python object
cdef
object
*
pobj
# pointer base type cannot be Python object
cdef
int
spam
[]
# incomplete variable type
cdef
Grail
g
# incomplete variable type
cdef
void
nada
# incomplete variable type
cdef
int
a_spam
[
17
][]
# incomplete element type
cdef
Grail
a_g
[
42
]
# incomplete element type
cdef
void
a_nada
[
88
]
# incomplete element type
cdef
struct
Eggs
:
int
spam
[]
cdef
f
(
Grail
g
,
# incomplete argument type
void
v
,
# incomplete argument type
int
a
[]):
pass
_ERRORS
=
u"""
3:19: Python object cannot be declared extern
4:16: Array element cannot be a Python object
5:12: Pointer base type cannot be a Python object
7:13: Variable type 'int []' is incomplete
8:11: Variable type 'Grail' is incomplete
9:10: Variable type 'void' is incomplete
11:15: Array element type 'int []' is incomplete
12:14: Array element type 'Grail' is incomplete
13:16: Array element type 'void' is incomplete
16:9: Variable type 'int []' is incomplete
#19:1: Function argument cannot be void
19:1: Use spam() rather than spam(void) to declare a function with no arguments.
18:7: Argument type 'Grail' is incomplete
19:1: Invalid use of 'void'
"""
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