Skip to content

gimarshallingtests: Use g_assert_cmpfloat_with_epsilon

Iain Lane requested to merge iainl/gobject-introspection:master into master

Comparing floats directly doesn't always work on all architectures.

Currently on Ubuntu 32-bit x86 (i386), gjs tests are failing like:

Bail out! ERROR:/usr/share/gobject-introspection-1.0/tests/gimarshallingtests.c:3170:gi_marshalling_tests_ghashtable_double_in: assertion failed (*value == -0.1): (-0.1 == -0.1)

I didn't really know what a good value of epsilon was

Edited by Iain Lane

Merge request reports