girepository test: Don't assume doubles are naturally-aligned

On i386 Linux, the minimal ABI alignment of a double is only 4, and
therefore the alignment of GDoubleIEEE754 is also 4.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2024-02-13 11:33:29 +00:00
parent c250c7b925
commit 2b2b6de70b

View File

@ -52,7 +52,7 @@ test_basic (RepositoryFixture *fx,
g_assert_null (gi_union_info_get_discriminator (double_info, 0));
g_assert_cmpuint (gi_union_info_get_size (double_info), ==, 8);
g_assert_cmpuint (gi_union_info_get_alignment (double_info), ==, 8);
g_assert_cmpuint (gi_union_info_get_alignment (double_info), ==, G_ALIGNOF (GDoubleIEEE754));
g_assert_null (gi_union_info_get_copy_function_name (double_info));
g_assert_null (gi_union_info_get_free_function_name (double_info));