Ditch longs and long longs in favor of stdint.h types, which has cascading

effects throughout, including use of inttypes.h/PRI[ud]64 because printf() is
still stuck in a long world, conversion of %lu to %zu for printing values of
type size_t, and changing/renaming the g_check_cmp* family of functions.
This commit is contained in:
Peter Johnson 2013-11-15 00:12:57 -05:00
parent f0a24ee4d0
commit c8fc061ea6
15 changed files with 64 additions and 52 deletions

View file

@ -1,10 +1,11 @@
#include <glib.h>
#include <stdint.h>
#include "hammer.h"
#include "internal.h"
#include "test_suite.h"
typedef struct {
unsigned long long data;
uint64_t data;
size_t nbits;
} bitwriter_test_elem; // should end with {0,0}
@ -29,7 +30,7 @@ void run_bitwriter_test(bitwriter_test_elem data[], char flags) {
};
for (i = 0; data[i].nbits; i++) {
g_check_cmpulonglong ((unsigned long long)h_read_bits(&input, data[i].nbits, FALSE), ==, data[i].data);
g_check_cmp_uint64((uint64_t)h_read_bits(&input, data[i].nbits, FALSE), ==, data[i].data);
}
}