[gcc r11-9300] libstdc++: Make test print which random_device tokens work
Jonathan Wakely
redi@gcc.gnu.org
Wed Nov 24 11:52:14 GMT 2021
https://gcc.gnu.org/g:4063c2012312555af00ad8bf68ad6c74665a315e
commit r11-9300-g4063c2012312555af00ad8bf68ad6c74665a315e
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.
(cherry picked from commit 95e8fcd3d50cbf5bf8a211afeafdf640ed86a015)
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 a351f57b236..fac5a9fb2c6 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>
@@ -57,8 +58,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 );
}
More information about the Libstdc++-cvs
mailing list