[libcxx-commits] [PATCH] D129414: [libc++][ranges][NFC] Consolidate some repetitive range algorithm tests:

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 14 01:25:20 PDT 2022


var-const added a comment.

In D129414#3647373 <https://reviews.llvm.org/D129414#3647373>, @huixie90 wrote:

> It seems that the "ranges_robust_against_copying_xxx" tests are in "test/libcxx/algorithms" and these "ranges_robust_against_" tests are in "test/std/algorithms".
> Is there a reason for using different directories?

Tests under the `std` directory should pass on any valid standard library implementation, while tests under `libcxx` are libc++-specific. It's not mandated that we don't copy comparators or projections (AFAIK, GCC does), it's just a self-imposed optimization (see https://reviews.llvm.org/D114136 for more context). OTOH, the behavior in these tests I believe is mandated by the standard, so it should go under `std`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129414/new/

https://reviews.llvm.org/D129414



More information about the libcxx-commits mailing list