[libcxx-commits] [PATCH] D120797: [libcxx] [test] Explain and clarify a Windows XFAIL
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 2 05:42:16 PST 2022
Quuxplusone requested changes to this revision.
Quuxplusone added inline comments.
This revision now requires changes to proceed.
================
Comment at: libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp:22-31
// TODO investigation needed.
// Glibc seems to collate files differently from the way Apple's C library does it.
// XFAIL: target={{.*}}-linux-gnu{{.*}}
-// XFAIL: LIBCXX-WINDOWS-FIXME
+// https://llvm.org/PR41018
+// XFAIL: windows-dll && msvc
+
----------------
Both glibc and Win32 have a different collation order from libc++-on-Apple. Are they the //same// collation order? Is this just a bug on Apple, perhaps?
That said, lines 47-62 totally reasonable to me. They're using `std::collate` in the `en_US.UTF-8` locale to compare `"aaaaaaA"` against `"BaaaaaA"`, and expecting "B" to collate after "a" in dictionary order. That seems totally fine and correct to me.
Lines 66-81 look fishy. They're doing the same dictionary-order test, but in the `C` locale! Isn't the `C` locale supposed to use basically `strcmp` to do its collation? `B` should sort before `a` in strcmp order. I suspect that perhaps this test should be flipped, enabled on Linux and XFAILed (if necessary) on Apple targets.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120797/new/
https://reviews.llvm.org/D120797
More information about the libcxx-commits
mailing list