aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-11-09 15:11:11 +0000
committerJonathan Wakely <jwakely@redhat.com>2021-11-09 15:12:29 +0000
commit95e8fcd3d50cbf5bf8a211afeafdf640ed86a015 (patch)
treeb9611f80626fcd05d003c8a4de09c5ff0475a51f
parentd9ebf0ce0845046cdd0cb40c598072bd1d91362c (diff)
downloadgcc-95e8fcd3d50cbf5bf8a211afeafdf640ed86a015.zip
gcc-95e8fcd3d50cbf5bf8a211afeafdf640ed86a015.tar.gz
gcc-95e8fcd3d50cbf5bf8a211afeafdf640ed86a015.tar.bz2
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.
-rw-r--r--libstdc++-v3/testsuite/26_numerics/random/random_device/cons/token.cc7
1 files changed, 7 insertions, 0 deletions
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 e56afbc..813db73 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 );
}