[committed] libstdc++: Fix memory issue in ranges::lexicographical_compare testcase
Patrick Palka
ppalka@redhat.com
Thu Oct 29 14:58:50 GMT 2020
On Thu, 29 Oct 2020, Patrick Palka wrote:
> libstdc++-v3/ChangeLog:
>
> * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
> (test03): Fix initializing the vector vy with the array y of size 4.
Now committed to the 10 branch as well.
> ---
> .../25_algorithms/lexicographical_compare/constrained.cc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
> index b82c872bbbb..2019bbc75e4 100644
> --- a/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
> +++ b/libstdc++-v3/testsuite/25_algorithms/lexicographical_compare/constrained.cc
> @@ -136,7 +136,7 @@ test03()
> VERIFY( !ranges::lexicographical_compare(cy.begin(), cy.end(),
> cz.begin(), cz.end()) );
>
> - std::vector<int> vx(x, x+5), vy(y, y+5);
> + std::vector<int> vx(x, x+5), vy(y, y+4);
> VERIFY( ranges::lexicographical_compare(vx, vy) );
> VERIFY( !ranges::lexicographical_compare(vx, vy, ranges::greater{}) );
> VERIFY( !ranges::lexicographical_compare(vy, vx) );
> --
> 2.29.0.rc0
>
>
More information about the Libstdc++
mailing list