[libcxx-commits] [PATCH] D120797: [libcxx] [test] Fix the collate compare test for Glibc, Windows and FreeBSD
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 10 14:30:29 PST 2022
EricWF added inline comments.
================
Comment at: libcxx/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp:36
+#define ASSERT_COMPARE(type, str1, str2, expected) \
+ do { \
----------------
The indirection here makes it harder to understand what the test is actually doing. For example, the actual object under test, the facet, isn't visibly used at the callsites.
"Don't repeat yourself" might be a good maxim most places, but it's totally fine for tests to contain repeated code.
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