[all-commits] [llvm/llvm-project] d05bad: [libcxx][test] std::array::iterator are not pointe...

Duo Wang via All-commits all-commits at lists.llvm.org
Sun Nov 12 08:30:28 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d05bada59205b9bcf1195a6eac7e09b721e3b79b
      https://github.com/llvm/llvm-project/commit/d05bada59205b9bcf1195a6eac7e09b721e3b79b
  Author: Duo Wang <duow1 at uci.edu>
  Date:   2023-11-12 (Sun, 12 Nov 2023)

  Changed paths:
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp
    M libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/ranges.all_of.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/ranges.any_of.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/ranges.none_of.pass.cpp
    M libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/ranges_set_difference.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/ranges_set_symmetric_difference.pass.cpp
    M libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
    M libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent_iter.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/decrement.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/deref.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/increment.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_move.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_swap.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/base.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/compare.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.pass.cpp
    M libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h

  Log Message:
  -----------
  [libcxx][test] std::array::iterator are not pointers by C++ standard (#70729)

This is to modify a list of libcxx tests written under the assumption
that iterators for std::array, std::string_view, and std::string are
pointers. The motivation for this PR is to make the tests more universal
and potentially being used to test other C++ standard library
implementations, for example
[microsoft/STL](https://github.com/microsoft/STL).

I can confirm that this patch makes a number of tests compatible with
microsoft STL:
`Failed :  204 (2.12%)`  ->  `Failed :  136 (1.42%)`
, and does not break any tests on `libcxx`.

This is not a complete list of such incompatibilities, but I am hoping
this will start a discussion about whether we are open to accepting such
changes.




More information about the All-commits mailing list