From 52b45e6b4074d4bce86d0f2f38a7f5588d1854d9 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 6 Oct 2016 21:22:53 +0100 Subject: [PATCH] fix check_bitset test on 32-bit platforms The use of `unsigned long` and `UL` suffices caused this test to fail on 32 bit platforms, where these are just 4, not 8 bits long. ``` tests/unit/check_bitset.c:73:F:bit:test_bit_ranges:0: longs[32] = 0 SHOULD BE ffffffff ``` --- tests/unit/check_bitset.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/check_bitset.c b/tests/unit/check_bitset.c index 1dda229..36b4e55 100644 --- a/tests/unit/check_bitset.c +++ b/tests/unit/check_bitset.c @@ -59,7 +59,7 @@ END_TEST START_TEST(test_bit_ranges) { bitfield_word_t buffer[BIT_WORDS_FOR_SIZE(4160)]; - uint64_t *longs = (unsigned long*) buffer; + uint64_t *longs = (uint64_t *) buffer; uint64_t i; memset(buffer, 0, 4160); @@ -67,9 +67,9 @@ START_TEST(test_bit_ranges) for (i=0; i<64; i++) { bit_set_range(buffer, i*64, i); fail_unless( - longs[i] == (1UL<