[libcxx-commits] [PATCH] D115588: [libcxx][test] Verify customization point object properties

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 15 14:35:58 PST 2021


ldionne added a comment.

In D115588#3195944 <https://reviews.llvm.org/D115588#3195944>, @jloser wrote:

> In D115588#3195937 <https://reviews.llvm.org/D115588#3195937>, @ldionne wrote:
>
>> Personally I quite liked the approach where we'd have a helper to check that a function object is a CPO and then we'd check it from each individual CPO test, but this is fine too. IMO this is just a bit easier to forget to update.
>
> 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.

When writing new CPOs, one rarely start from scratch. I think most people will look at the tests for existing CPOs and base their new tests on that. If they do it, then this `test_cpo` would nicely be discoverable.


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