You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
814 B

11 years ago
#include "../src/common.h"
11 years ago
#include "../src/bitmap.h"
11 years ago
int
main(int argc, char **argv)
{
11 years ago
bitmap_t a, b;
11 years ago
11 years ago
memset (a, 0x00, sizeof(bitmap_t));
memset (b, 0x00, sizeof(bitmap_t));
assert(bitmap_compare(a, b) == 0);
11 years ago
11 years ago
memset (a, 0xFE, sizeof(bitmap_t));
memset (b, 0xFF, sizeof(bitmap_t));
assert(bitmap_compare(a, b) == 32);
11 years ago
11 years ago
memset (a, 0x00, sizeof(bitmap_t));
memset (b, 0x55, sizeof(bitmap_t));
assert(bitmap_compare(a, b) == 128);
11 years ago
11 years ago
memset (a, 0x00, sizeof(bitmap_t));
memset (b, 0xAA, sizeof(bitmap_t));
assert(bitmap_compare(a, b) == 128);
11 years ago
11 years ago
memset (a, 0xAA, sizeof(bitmap_t));
memset (b, 0x55, sizeof(bitmap_t));
assert(bitmap_compare(a, b) == 256);
11 years ago
11 years ago
memset (a, 0x00, sizeof(bitmap_t));
memset (b, 0xFF, sizeof(bitmap_t));
assert(bitmap_compare(a, b) == 256);
11 years ago
return 0;
}