[libcxx] [test] Remove nonportable locale assumption in basic.ios.members/narrow.pass.cpp

I'm not sure if libcxx is asserting UTF-8 here; but on Windows the full char value is always passed through in its entirety, since the default codepage is something like Windows-1252. The replacement character is only used for non-chars there; and that should be a more portable test everywhere.

(Still pending review at https://reviews.llvm.org/D47395 which has been open since may; will ask for forgiveness rather than permission :) )

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Billy Robert O'Neal III
2018-08-08 00:47:29 +00:00
parent d963dbfd40
commit 76dae9f0ba

View File

@@ -18,7 +18,7 @@
int main()
{
const std::ios ios(0);
assert(ios.narrow('c', '*') == 'c');
assert(ios.narrow('\xFE', '*') == '*');
const std::wios ios(0);
assert(ios.narrow(L'c', '*') == 'c');
assert(ios.narrow(L'\u203C', '*') == '*');
}