diff --git a/test cases/common/45 alignment/meson.build b/test cases/common/45 alignment/meson.build index 0dd8df505..2ec3f898a 100644 --- a/test cases/common/45 alignment/meson.build +++ b/test cases/common/45 alignment/meson.build @@ -11,13 +11,18 @@ endif ptr_size = cc.sizeof('void*') dbl_alignment = cc.alignment('double') -if host.name() == 'windows' - dbl_exp = 8 +# These tests are not thorough. Doing this properly +# would take a lot of work because it is strongly +# platform and compiler dependent. So just check +# that they produce something fairly sane. + +if ptr_size == 8 or ptr_size == 4 + message('Size of ptr ok.') else - dbl_exp = ptr_size + error('Size of ptr misdetected.') endif -if dbl_alignment == dbl_exp +if dbl_alignment == 8 or dbl_alignment == 4 message('Alignment of double ok.') else error('Alignment of double misdetected.')