[committed] libstdc++: Make test print which random_device tokens work

Message ID 20211109151429.2715344-1-jwakely@redhat.com
State Committed
Commit 95e8fcd3d50cbf5bf8a211afeafdf640ed86a015
Headers
Series [committed] libstdc++: Make test print which random_device tokens work |

Commit Message

Jonathan Wakely Nov. 9, 2021, 3:14 p.m. UTC
  Tested x86_64-linux, pushed to trunk.


libstdc++-v3/ChangeLog:

	* testsuite/26_numerics/random/random_device/cons/token.cc:
	Print results of random_device_available checks.
---
 .../26_numerics/random/random_device/cons/token.cc         | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

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 );
 }