tests: Don't assume that all platforms are 64-bit

On ILP32 platforms, 4 is a valid alignment for g_aligned_alloc(), so
use 2 as our invalid alignment instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2022-02-15 10:47:28 +00:00
parent 66857db98e
commit d04f3491af

View File

@ -943,7 +943,7 @@ aligned_alloc_nmov (void)
gpointer a;
/* Test an alignment thats not a multiple of sizeof(void*) */
a = g_aligned_alloc (16, sizeof(char), 4);
a = g_aligned_alloc (16, sizeof(char), sizeof(void *) / 2);
g_assert_null (a);
exit (0);
}