public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5058] libstdc++: Make test print which random_device tokens work
@ 2021-11-09 15:14 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-11-09 15:14 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:95e8fcd3d50cbf5bf8a211afeafdf640ed86a015

commit r12-5058-g95e8fcd3d50cbf5bf8a211afeafdf640ed86a015
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 9 15:11:11 2021 +0000

    libstdc++: Make test print which random_device tokens work
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/26_numerics/random/random_device/cons/token.cc:
            Print results of random_device_available checks.

Diff:
---
 .../testsuite/26_numerics/random/random_device/cons/token.cc       | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
index e56afbc9c97..813db73873c 100644
--- a/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
+++ b/libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc
@@ -24,6 +24,7 @@
 
 #include <random>
 #include <stdexcept>
+#include <cstdio>
 #include <testsuite_hooks.h>
 #include <testsuite_random.h>
 
@@ -59,8 +60,14 @@ test03()
   int count = 0;
   for (const std::string& token : tokens)
   {
+    std::printf("checking std::random_device(\"%s\"):\t", token.c_str());
     if (__gnu_test::random_device_available(token))
+    {
+      std::puts("yes");
       ++count;
+    }
+    else
+      std::puts("no");
   }
   VERIFY( count != 0 );
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-09 15:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 15:14 [gcc r12-5058] libstdc++: Make test print which random_device tokens work Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).