]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Make test print which random_device tokens work
authorJonathan Wakely <jwakely@redhat.com>
Tue, 9 Nov 2021 15:11:11 +0000 (15:11 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 9 Nov 2021 15:12:29 +0000 (15:12 +0000)
libstdc++-v3/ChangeLog:

* testsuite/26_numerics/random/random_device/cons/token.cc:
Print results of random_device_available checks.

libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc

index e56afbc9c975c9dcbc1c297d9e326fd2a9da22f6..813db73873c197b64bf45bbdacf85f227fcdb7b1 100644 (file)
@@ -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 );
 }