mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Bug 610858 - gvariant test fails sometimes
NaN floating point values get mangled when passing across the function call ABI on x86 so avoid using them to get rid of spurious failures. Reported by Christian Persch and reliably reproduced by Emilio Pozuelo Monfort.
This commit is contained in:
parent
a57522deae
commit
5b19345246
@ -1933,13 +1933,18 @@ tree_instance_new (const GVariantType *type,
|
||||
instance->data_size = 4;
|
||||
break;
|
||||
|
||||
case 'x': case 't': case 'd':
|
||||
case 'x': case 't':
|
||||
instance->data.integer = g_test_rand_int ();
|
||||
instance->data.integer <<= 32;
|
||||
instance->data.integer |= (guint32) g_test_rand_int ();
|
||||
instance->data_size = 8;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
instance->data.floating = g_test_rand_double ();
|
||||
instance->data_size = 8;
|
||||
break;
|
||||
|
||||
case 's': case 'o': case 'g':
|
||||
instance->data_size = g_test_rand_int_range (10, 20);
|
||||
make_random_string (instance->data.string, instance->data_size, type);
|
||||
|
Loading…
Reference in New Issue
Block a user