Commit be9f196d authored by Dafydd Harries's avatar Dafydd Harries

test nice_rng_generate_bytes

darcs-hash:20070205191117-c9803-4b3ccb476da684d25f11ab287eb4c0842be61f1b.gz
parent 6739b221
......@@ -9,12 +9,18 @@ main (void)
NiceRNG *rng;
gchar buf[9];
buf[8] = '\0';
nice_rng_set_new_func (nice_rng_glib_new_predictable);
rng = nice_rng_new ();
nice_rng_generate_bytes_print (rng, 8, buf);
buf[8] = '\0';
//g_debug ("%s", buf);
g_assert (0 == strcmp (buf, "S9PObXR5"));
nice_rng_generate_bytes (rng, 8, buf);
g_assert (0 == strcmp (buf, "\x09\xd3\x15\xf2\x24\x57\x46\xd8"));
nice_rng_free (rng);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment