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
22da8446
Commit
22da8446
authored
May 28, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bufaccess tests broken by CF
parent
9da676a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
23 deletions
+24
-23
tests/errors/bufaccess_noassignT444.pyx
tests/errors/bufaccess_noassignT444.pyx
+10
-0
tests/run/bufaccess.pyx
tests/run/bufaccess.pyx
+14
-23
No files found.
tests/
compile
/bufaccess_noassignT444.pyx
→
tests/
errors
/bufaccess_noassignT444.pyx
View file @
22da8446
# ticket: 444
# mode:
compile
# mode:
error
def
test
():
cdef
object
[
int
]
not_assigned_to
not_assigned_to
[
2
]
=
3
_ERRORS
=
"""
6:20: local variable 'not_assigned_to' referenced before assignment
"""
tests/run/bufaccess.pyx
View file @
22da8446
...
...
@@ -47,15 +47,6 @@ def nousage():
"""
cdef
object
[
int
,
ndim
=
2
]
buf
def
printbuf
():
"""
Just compilation.
"""
cdef
object
[
int
,
ndim
=
2
]
buf
print
buf
return
buf
[
0
,
0
]
=
0
@
testcase
def
acquire_release
(
o1
,
o2
):
"""
...
...
@@ -681,20 +672,20 @@ def mixed_get(object[int] buf, int unsafe_idx, int safe_idx):
#
# Coercions
#
@
testcase
def
coercions
(
object
[
unsigned
char
]
uc
):
"""
TODO
"""
print
type
(
uc
[
0
])
uc
[
0
]
=
-
1
print
uc
[
0
]
uc
[
0
]
=
<
int
>
3.14
print
uc
[
0
]
cdef
char
*
ch
=
b"asfd"
cdef
object
[
object
]
objbuf
objbuf
[
3
]
=
ch
##
@testcase
##
def coercions(object[unsigned char] uc):
##
"""
##
TODO
##
"""
##
print type(uc[0])
##
uc[0] = -1
##
print uc[0]
##
uc[0] = <int>3.14
##
print uc[0]
##
cdef char* ch = b"asfd"
##
cdef object[object] objbuf
##
objbuf[3] = ch
#
...
...
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