testing wchar_t
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5836 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8a2343f31d
commit
7de77b0bc3
2 changed files with 9 additions and 2 deletions
|
|
@ -26,6 +26,10 @@ struct B
|
|||
};
|
||||
|
||||
|
||||
wchar_t test_wcvalue(wchar_t x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
const wchar_t* test_ccvalue(const wchar_t* x) {
|
||||
return x;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
import lib_std_wstring
|
||||
|
||||
x=u"h"
|
||||
|
||||
if lib_std_wstring.test_wcvalue(x) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
x=u"hello"
|
||||
|
||||
|
||||
if lib_std_wstring.test_ccvalue(x) != x:
|
||||
raise RuntimeError, "bad string mapping"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue