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.
https://reviews.llvm.org/D47395
Files:
test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp
Index:
test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp
===================================================================
--- test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp
+++ 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', '*') == '*');
}
Index: test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp
===================================================================
--- test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp
+++ 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', '*') == '*');
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits