Exemplo n.º 1
0
int
main(int argc, char **argv)
{
	unif01_Gen *gen;
	int rc;

	gen = unif01_CreateExternGenBits("arc4random", arc4random);

	/* XXX: The following battery does not set pVal, so we cannot check
	 * the results. */
	bbattery_FIPS_140_2(gen);

	/* XXX: The following battery fails one test. */
	bbattery_pseudoDIEHARD(gen);
	test_battery_result();

	bbattery_Rabbit(gen, 33554432);
	test_battery_result();

	bbattery_SmallCrush(gen);
	test_battery_result();

	unif01_DeleteExternGenBits(gen);

	if (test_failed) {
		test_print("failed tests = %d", test_failed);
		/* XXX: We should probably FAIL the test, but we currently
		 * have one test always failing. */
		rc = TEST_SKIP;
	} else {
		rc = TEST_OK;
	}

	return rc;
}
Exemplo n.º 2
0
void run_crush_testu01_uint(const char* name)
{
  unif01_Gen *gen;
  gen = unif01_CreateExternGenBits((char*)name, test_rand_uint32);
  bbattery_Crush(gen);
  unif01_DeleteExternGenBits(gen);
}
Exemplo n.º 3
0
int main (void) 
{
   unif01_Gen *gen;

   gen = unif01_CreateExternGen01 ("MRG32k3a", MRG32k3a);
   bbattery_SmallCrush (gen);
   unif01_DeleteExternGen01 (gen);

   gen = unif01_CreateExternGenBits ("xorshift", xorshift);
   bbattery_SmallCrush (gen);
   unif01_DeleteExternGenBits (gen);

   return 0;
}