Commit d925b7a0 authored by Stefan Behnel's avatar Stefan Behnel

fix some C++ tests

parent 88b9af1b
...@@ -31,7 +31,7 @@ def test_string(o): ...@@ -31,7 +31,7 @@ def test_string(o):
def test_string_call(a, b): def test_string_call(a, b):
""" """
>>> normalize(test_string_call("abc", "xyz")) >>> normalize(test_string_call("abc".encode('ascii'), "xyz".encode('ascii')))
'abcxyz' 'abcxyz'
""" """
return add_strings(a, b) return add_strings(a, b)
......
...@@ -7,10 +7,10 @@ def test_cpp_specialization(cython.floating element): ...@@ -7,10 +7,10 @@ def test_cpp_specialization(cython.floating element):
""" """
>>> import cython >>> import cython
>>> test_cpp_specialization[cython.float](10.0) >>> test_cpp_specialization[cython.float](10.0)
vector<float> * float 10.0 vector[float] * float 10.0
>>> test_cpp_specialization[cython.double](10.0) >>> test_cpp_specialization[cython.double](10.0)
vector<double> * double 10.0 vector[double] * double 10.0
""" """
cdef vector[cython.floating] *v = new vector[cython.floating]() cdef vector[cython.floating] *v = new vector[cython.floating]()
v.push_back(element) v.push_back(element)
print cython.typeof(v), cython.typeof(element), v.at(0) print cython.typeof(v), cython.typeof(element), v.at(0)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment