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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5c6a9024
Commit
5c6a9024
authored
Mar 28, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend cpp_enums test into a runnable test.
parent
1e98c40c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
tests/run/cpp_enums.pyx
tests/run/cpp_enums.pyx
+16
-1
No files found.
tests/
compile
/cpp_enums.pyx
→
tests/
run
/cpp_enums.pyx
View file @
5c6a9024
# tag: cpp
# tag: cpp
# mode:
compile
# mode:
run
cdef
extern
from
*
:
cdef
extern
from
*
:
"""
"""
...
@@ -21,6 +21,14 @@ x = Item1
...
@@ -21,6 +21,14 @@ x = Item1
y
=
Item2
y
=
Item2
def
compare_enums
():
"""
>>> compare_enums()
(True, True, True, True)
"""
return
x
==
a
,
a
==
Item1
,
b
==
y
,
y
==
Item2
cdef
extern
from
*
namespace
"Namespace1"
:
cdef
extern
from
*
namespace
"Namespace1"
:
"""
"""
namespace Namespace1 {
namespace Namespace1 {
...
@@ -41,3 +49,10 @@ cdef Enum2 z, w
...
@@ -41,3 +49,10 @@ cdef Enum2 z, w
z
=
Item3
z
=
Item3
w
=
Item4
w
=
Item4
def
compare_namespace_enums
():
"""
>>> compare_namespace_enums()
(True, True, True, True)
"""
return
z
==
c
,
c
==
Item3
,
d
==
w
,
d
==
Item4
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