Fixed a bug in wstring_convert concerning zero-length inputs. Thanks to Jonathan Coxhead for reporting this bug.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160136 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,5 +33,7 @@ int main()
|
||||
assert(ws == L"\x40003");
|
||||
ws = myconv.from_bytes(bs.data(), bs.data() + bs.size());
|
||||
assert(ws == L"\x40003");
|
||||
ws = myconv.from_bytes("");
|
||||
assert(ws.size() == 0);
|
||||
}
|
||||
}
|
||||
|
@@ -33,5 +33,7 @@ int main()
|
||||
assert(bs == "\xF1\x80\x80\x83");
|
||||
bs = myconv.to_bytes(ws.data(), ws.data() + ws.size());
|
||||
assert(bs == "\xF1\x80\x80\x83");
|
||||
bs = myconv.to_bytes(L"");
|
||||
assert(bs.size() == 0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user