Properly terminate UTF-16 strings in cMB2WC() unit test
Such strings must have 2 NUL bytes at the end, just the one added implicitly to all C strings isn't enough.
This commit is contained in:
parent
aaea62a322
commit
0425b8b7f0
1 changed files with 2 additions and 2 deletions
|
|
@ -1484,8 +1484,8 @@ TEST_CASE("wxMBConv::cMB2WC", "[mbconv][mb2wc]")
|
|||
|
||||
CHECK( convUTF16.cMB2WC("\0").length() == 0 );
|
||||
CHECK( convUTF16.cMB2WC(wxCharBuffer()).length() == 0 );
|
||||
CHECK( convUTF16.cMB2WC("H\0i\0").length() == 2 );
|
||||
CHECK( convUTF16.cMB2WC(wxCharBuffer::CreateNonOwned("H\0i\0", 4)).length() == 2 );
|
||||
CHECK( convUTF16.cMB2WC("H\0i\0\0").length() == 2 );
|
||||
CHECK( convUTF16.cMB2WC(wxCharBuffer::CreateNonOwned("H\0i\0\0", 4)).length() == 2 );
|
||||
|
||||
CHECK( wxConvUTF7.cMB2WC("").length() == 0 );
|
||||
CHECK( wxConvUTF7.cMB2WC(wxCharBuffer()).length() == 0 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue