From 76dae9f0ba26722b8325fe7c5c7c07a93c20817a Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 8 Aug 2018 00:47:29 +0000 Subject: [PATCH] [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 --- .../iostreams.base/ios/basic.ios.members/narrow.pass.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp b/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp index bf865e681..3cdb434c4 100644 --- a/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp +++ b/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp @@ -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', '*') == '*'); }