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.
This commit is contained in:
Jonathan Wakely 2021-11-09 15:11:11 +00:00
parent d9ebf0ce08
commit 95e8fcd3d5

View File

@ -24,6 +24,7 @@
#include <random>
#include <stdexcept>
#include <cstdio>
#include <testsuite_hooks.h>
#include <testsuite_random.h>
@ -59,9 +60,15 @@ 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 );
}