[PATCH] D47395: [libcxx] [test] Remove nonportable locale assumption in basic.ios.members/narrow.pass.cpp
Billy Robert O'Neal III via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 25 14:51:29 PDT 2018
BillyONeal created this revision.
BillyONeal added reviewers: EricWF, mclow.lists.
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.
@@ -18,7 +18,7 @@
- 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', '*') == '*');
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 581 bytes
Desc: not available
More information about the cfe-commits