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
Kirill Smelkov
cython
Commits
ee6c58e1
Commit
ee6c58e1
authored
Feb 13, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable tests to "new" for the ancient boxen CI gcc.
parent
3daa4bf5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
tests/run/cpp_stl_conversion.pyx
tests/run/cpp_stl_conversion.pyx
+22
-21
No files found.
tests/run/cpp_stl_conversion.pyx
View file @
ee6c58e1
# tag: cpp
# distutils: extra_compile_args=-std=c++0x
## Re-enable once our buildbot gcc is upgraded to a less-than-seven year old release.
## distutils: extra_compile_args=-std=c++0x
import
sys
from
libcpp.map
cimport
map
from
libcpp.unordered_map
cimport
unordered_map
#
from libcpp.unordered_map cimport unordered_map
from
libcpp.set
cimport
set
as
cpp_set
from
libcpp.unordered_set
cimport
unordered_set
#
from libcpp.unordered_set cimport unordered_set
from
libcpp.string
cimport
string
from
libcpp.pair
cimport
pair
from
libcpp.vector
cimport
vector
...
...
@@ -143,17 +144,17 @@ def test_set(o):
cdef
cpp_set
[
long
]
s
=
o
return
s
def
test_unordered_set
(
o
):
"""
>>> sorted(test_unordered_set([1, 2, 3]))
[1, 2, 3]
>>> sorted(test_unordered_set([1, 2, 3, 3]))
[1, 2, 3]
>>> type(test_unordered_set([])) is py_set
True
"""
cdef
unordered_set
[
long
]
s
=
o
return
s
#
def test_unordered_set(o):
#
"""
#
>>> sorted(test_unordered_set([1, 2, 3]))
#
[1, 2, 3]
#
>>> sorted(test_unordered_set([1, 2, 3, 3]))
#
[1, 2, 3]
#
>>> type(test_unordered_set([])) is py_set
#
True
#
"""
#
cdef unordered_set[long] s = o
#
return s
def
test_map
(
o
):
"""
...
...
@@ -163,13 +164,13 @@ def test_map(o):
cdef
map
[
int
,
double
]
m
=
o
return
m
def
test_unordered_map
(
o
):
"""
>>> test_map({1: 1.0, 2: 0.5, 3: 0.25})
{1: 1.0, 2: 0.5, 3: 0.25}
"""
cdef
unordered_map
[
int
,
double
]
m
=
o
return
m
#
def test_unordered_map(o):
#
"""
#
>>> test_map({1: 1.0, 2: 0.5, 3: 0.25})
#
{1: 1.0, 2: 0.5, 3: 0.25}
#
"""
#
cdef unordered_map[int, double] m = o
#
return m
def
test_nested
(
o
):
"""
...
...
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