mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 21:33:09 +02:00
Add a test for the previous fix
This commit is contained in:
parent
77be95cdce
commit
1e88c5321c
@ -149,13 +149,28 @@ test_rand (void)
|
|||||||
g_rand_free (copy);
|
g_rand_free (copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
test_double_range (void)
|
||||||
|
{
|
||||||
|
gdouble d;
|
||||||
|
|
||||||
|
g_test_bug ("502560");
|
||||||
|
|
||||||
|
d = g_random_double_range (-G_MAXDOUBLE, G_MAXDOUBLE);
|
||||||
|
|
||||||
|
g_assert (-G_MAXDOUBLE <= d);
|
||||||
|
g_assert (d < G_MAXDOUBLE);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc,
|
main (int argc,
|
||||||
char *argv[])
|
char *argv[])
|
||||||
{
|
{
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
g_test_bug_base ("http://bugzilla.gnome.org/");
|
||||||
|
|
||||||
g_test_add_func ("/rand/test-rand", test_rand);
|
g_test_add_func ("/rand/test-rand", test_rand);
|
||||||
|
g_test_add_func ("/rand/double-range", test_double_range);
|
||||||
|
|
||||||
return g_test_run();
|
return g_test_run();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user