From f701e7653f842a98bdd0b32dac7318af8e49bf32 Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Mon, 15 Aug 2011 20:13:20 +0200 Subject: [PATCH] Fix test: remove suspicious aliasing --- tests/core/GP_Common.test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/core/GP_Common.test.c b/tests/core/GP_Common.test.c index 0fe2b1f2..9695d93c 100644 --- a/tests/core/GP_Common.test.c +++ b/tests/core/GP_Common.test.c @@ -29,7 +29,7 @@ * Demo ("testing" ;-) tests for GP_Common.h */ -GP_SUITE(GP_Common) +GP_SUITE(GP_Common) GP_TEST(min_max) { @@ -56,17 +56,19 @@ GP_TEST(set_bits) uint16_t *y = (uint16_t*) &x; GP_CLEAR_BITS(3, 4, x); fail_unless(x == 0x89A84); - GP_SET_BITS_OR(10, x, 0x0000000); + GP_SET_BITS_OR(10, x, 0x0000000); fail_unless(x == 0x89A84); - GP_SET_BITS(24, 18, x, 0x42F1); + GP_SET_BITS(24, 18, x, 0x42F1); fail_unless(x == 0xF1089A84); /* Check that only uint16_t is affected */ - GP_SET_BITS(0, 24, *y, 0x100F000LL); +/* TODO: Fix aliasing problems with this test + GP_SET_BITS(0, 24, *y, 0x100F000LL); # if __BYTE_ORDER == __BIG_ENDIAN fail_unless(x == 0xF108F000); # else fail_unless(x == 0x100F9A84); -# endif +# endif +*/ } GP_ENDTEST -- 2.11.4.GIT