[gcc(refs/users/ppalka/heads/libstdcxx-constrained-algos)] Verify the return value of ranges::shuffle in its unit test

Patrick Palka ppalka@gcc.gnu.org
Mon Jan 27 19:05:00 GMT 2020


https://gcc.gnu.org/g:eb62852f8b1db6ae15dd6ca04de374ad779926ae

commit eb62852f8b1db6ae15dd6ca04de374ad779926ae
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Jan 27 13:39:24 2020 -0500

    Verify the return value of ranges::shuffle in its unit test

Diff:
---
 libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc
index d57125c..b96343a 100644
--- a/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc
+++ b/libstdc++-v3/testsuite/25_algorithms/shuffle/constrained.cc
@@ -47,8 +47,9 @@ test01()
 	= {&v2[0], &v2[0] + size};
 
       std::ranlux48_base g1(size), g2(size + 1);
-      ranges::shuffle(c, g1);
-      ranges::shuffle(ranges::begin(r), ranges::end(r), g2);
+      VERIFY( ranges::shuffle(c, g1) == c.end() );
+      VERIFY( ranges::shuffle(ranges::begin(r), ranges::end(r), g2)
+	      == ranges::end(r) );
 
       if (size >= 10)
 	{



More information about the Libstdc++-cvs mailing list