[libcxx-commits] [libcxx] 9a9a372 - [libcxx] [test] Fix testcases that fail on systems with 16 bit wchar_t
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 28 01:22:11 PST 2022
Author: Martin Storsjö
Date: 2022-01-28T11:21:14+02:00
New Revision: 9a9a372d38f445b07551b6c0932116666c0e35d4
URL: https://github.com/llvm/llvm-project/commit/9a9a372d38f445b07551b6c0932116666c0e35d4
DIFF: https://github.com/llvm/llvm-project/commit/9a9a372d38f445b07551b6c0932116666c0e35d4.diff
LOG: [libcxx] [test] Fix testcases that fail on systems with 16 bit wchar_t
Don't decode a UTF-8 character that is out of range for a 16 bit
`wchar_t`.
Differential Revision: https://reviews.llvm.org/D118191
Added:
Modified:
libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
index 8816227c327f4..db0c6603d1300 100644
--- a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
+++ b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
@@ -6,9 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// 'do_bytes' throws a std::range_error unexpectedly
-// XFAIL: LIBCXX-WINDOWS-FIXME, powerpc-ibm-aix
-
// XFAIL: libcpp-has-no-wide-characters
// UNSUPPORTED: c++03
@@ -32,9 +29,9 @@ int main(int, char**)
// create a converter and perform some conversions to generate some
// interesting state.
Myconv myconv;
- myconv.from_bytes("\xF1\x80\x80\x83");
+ myconv.from_bytes("\xEF\xBF\xBD");
const auto old_converted = myconv.converted();
- assert(myconv.converted() == 4);
+ assert(myconv.converted() == 3);
// move construct a new converter and make sure the state is the same.
Myconv myconv2(std::move(myconv));
assert(myconv2.converted() == old_converted);
More information about the libcxx-commits
mailing list