[libcxx-commits] [PATCH] D120802: [libcxx] [test] Fix the classic_table test on Windows
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 2 05:17:10 PST 2022
Quuxplusone added subscribers: NancyWang2222, SeanP.
Quuxplusone added a comment.
IMHO this test starts out really bad, but these changes don't improve it in the right direction. I'd suggest either
(1) leave it XFAIL'ed for Windows with no FIXME, or
(2) completely rewrite it in the form
#ifdef _WIN32
const mask expected_table[] = {
[...]
};
#else
const mask expected_table[] = {
0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x24200, 0x04200, 0x04200, 0x04200, 0x04200, 0x00200, 0x00200,
0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200, 0x00200,
0x64000, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800,
0x50c00, 0x50c01, 0x50c02, 0x50c03, 0x50c04, 0x50c05, 0x50c06, 0x50c07, 0x50c08, 0x50c09, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800, 0x42800,
0x42800, 0x5890a, 0x5890b, 0x5890c, 0x5890d, 0x5890e, 0x5890f, 0x48900, 0x48900, 0x48900, 0x48900, 0x48900, 0x48900, 0x48900, 0x48900, 0x48900,
[...]
0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
};
#endif
assert(F::table_size == 256);
assert(std::equal(p, p + 256, expected_table));
(3) What about z/OS and EBCDIC? I bet @NancyWang2222 and @SeanP are eventually going to get around to this test, and then it's going to have to undergo surgery again. So we should plan ahead for that, too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120802/new/
https://reviews.llvm.org/D120802
More information about the libcxx-commits
mailing list