llvm-project/libcxx/test/std/iterators
Louis Dionne d27cbfa9d3 [libc++] Fix bug in ranges::advance
In `ranges::advance(iter, n, bound)`, we'd incorrectly handle the case
where bound < iter and n is 0:

    int a[10];
    int *p = a+5;
    int *bound = a+3;
    std::ranges::advance(p, 0, bound);
    assert(p - a == 5); // we'd return 3 before this patch

This was caused by an incorrect handling of 0 inside __magnitude_geq.

Differential Revision: https://reviews.llvm.org/D117240
2022-01-27 10:57:54 -05:00
..
iterator.container [libc++] Fix ssize test that made an assumption about ptrdiff_t being 'long' 2021-11-25 13:12:47 -05:00
iterator.primitives [libc++] Fix bug in ranges::advance 2022-01-27 10:57:54 -05:00
iterator.range [libc++][test] Remove disable_missing_braces_warning.h from tests 2021-09-22 16:00:16 -04:00
iterator.requirements [libc++][test] Move iter_swap into iterator.cust.swap. NFC. 2022-01-11 19:56:35 -05:00
iterator.synopsis Support tests in freestanding 2019-02-04 20:31:13 +00:00
iterators.general [libc++] Remove useless nothing_to_do.pass.cpp tests 2020-04-03 13:48:34 -04:00
predef.iterators [libc++] Fix common_iterator for output_iterators 2022-01-27 10:57:04 -05:00
stream.iterators [libcxx][test] compiler options are non-portable 2022-01-18 11:34:57 -08:00