Author: bion Date: Tue Aug 7 17:47:29 2018 New Revision: 339213 URL: http://llvm.org/viewvc/llvm-project?rev=339213&view=rev Log: [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 :) ) Modified: libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp Modified: libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp?rev=339213&r1=339212&r2=339213&view=diff ============================================================================== --- libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp (original) +++ libcxx/trunk/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp Tue Aug 7 17:47:29 2018 @@ -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', '*') == '*'); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits