[libcxx-commits] [PATCH] D115588: [libcxx][test] Verify customization point object properties
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 15 19:36:54 PST 2021
var-const added a comment.
> I may //slightly// prefer having the helper and just use it each test, but don't feel strongly. Arguably, for a "new" (not-yet-implemented CPO like the ones commented out here), it's just as easy to forget to call `test_cpo` (or whatever we call the helper function template). For the existing, but not-yet-implemented CPOs, this one file approach at least is a gentle TODO for "uncomment me when it's implemented". But, you need to know about the file in the first place from git-grepping around.
>
> Thoughts @Quuxplusone @var-const or others?
FWIW, I have a slight preference to the current single-file approach; from the readability perspective, I find "test for common behavior across a range of related types" to be a more natural structuring than "test a single type for a wide range of different unrelated behaviors".
>From the discoverability perspective, the one-file-per-class approach is probably slightly better because someone writing a new test will likely base it on an existing test. OTOH, verifying that the tests cover all existing CPOs is much easier with the single-file approach.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115588/new/
https://reviews.llvm.org/D115588
More information about the libcxx-commits
mailing list