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
Xavier Thompson
cython
Commits
1b281f59
Commit
1b281f59
authored
Sep 30, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unit test for isinstanceof with const cypclass arguments
parent
48aeaa3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
tests/run/cypclass_isinstanceof.pyx
tests/run/cypclass_isinstanceof.pyx
+20
-1
No files found.
tests/run/cypclass_isinstanceof.pyx
View file @
1b281f59
...
@@ -26,3 +26,22 @@ def test_insinstanceof():
...
@@ -26,3 +26,22 @@ def test_insinstanceof():
cdef
int
r6
=
isinstanceof
[
Derived
](
derived
)
cdef
int
r6
=
isinstanceof
[
Derived
](
derived
)
print
(
r1
,
r2
,
r3
,
r4
,
r5
,
r6
)
print
(
r1
,
r2
,
r3
,
r4
,
r5
,
r6
)
def
test_const_insinstanceof
():
"""
>>> test_const_insinstanceof()
(1, 1, 1, 0, 1, 1)
"""
cdef
const
Base
base
=
Base
()
cdef
const
Base
derived_as_base
=
Derived
()
cdef
const
Derived
derived
=
Derived
()
cdef
int
r1
=
isinstanceof
[
Base
](
base
)
cdef
int
r2
=
isinstanceof
[
Base
](
derived_as_base
)
cdef
int
r3
=
isinstanceof
[
Base
](
derived
)
cdef
int
r4
=
isinstanceof
[
Derived
](
base
)
cdef
int
r5
=
isinstanceof
[
Derived
](
derived_as_base
)
cdef
int
r6
=
isinstanceof
[
Derived
](
derived
)
print
(
r1
,
r2
,
r3
,
r4
,
r5
,
r6
)
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