diff --git a/test/polymorphism.cpp b/test/polymorphism.cpp index 0fbaf9d5..02713ae2 100644 --- a/test/polymorphism.cpp +++ b/test/polymorphism.cpp @@ -1,4 +1,3 @@ -#define BOOST_NO_STD_WSTRING // Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at diff --git a/test/test_builtin_converters.cpp b/test/test_builtin_converters.cpp index 4284adc8..2b20b719 100644 --- a/test/test_builtin_converters.cpp +++ b/test/test_builtin_converters.cpp @@ -85,14 +85,14 @@ BOOST_PYTHON_MODULE(builtin_converters) def("rewrap_value_complex_double", by_value >::rewrap); def("rewrap_value_complex_long_double", by_value >::rewrap); def("rewrap_value_wstring", -# ifdef BOOST_NO_STD_WSTRING +# if defined(BOOST_NO_STD_WSTRING) || !defined(Py_USING_UNICODE) identity_ # else by_value::rewrap # endif ); def("rewrap_value_string", -# ifdef BOOST_NO_STD_WSTRING +# if defined(BOOST_NO_STD_WSTRING) || !defined(Py_USING_UNICODE) identity_ # else by_value::rewrap diff --git a/test/test_builtin_converters.py b/test/test_builtin_converters.py index 3c2e13b8..ddff3c63 100644 --- a/test/test_builtin_converters.py +++ b/test/test_builtin_converters.py @@ -78,12 +78,23 @@ r""" 'hello, world' >>> rewrap_value_string('yo, wassup?') 'yo, wassup?' ->>> rewrap_value_wstring(u'yo, wassup?') -u'yo, wassup?' - test that overloading on unicode works: +>>> try: +... unicode +... catch: +... print "u'yo, wassup?'" +... else: +... eval("rewrap_value_wstring(u'yo, wassup?')") +u'yo, wassup?' ->>> rewrap_value_string(u'yo, wassup?') + test that overloading on unicode works: + +>>> try: +... unicode +... catch: +... print "u'yo, wassup?'" +... else: +... eval("rewrap_value_string(u'yo, wassup?')") u'yo, wassup?' wrap strings with embedded nulls: