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.
34 lines
894 B
34 lines
894 B
#include "../src/main.h" |
|
#include "../src/bitmap.h" |
|
|
|
int |
|
main(int argc, char **argv) |
|
{ |
|
bitmap a, b; |
|
|
|
memset (&a, 0x00, 16 * sizeof(uint16_t)); |
|
memset (&b, 0x00, 16 * sizeof(uint16_t)); |
|
assert(bitmap_compare(&a, &b) == 0); |
|
|
|
memset (&a, 0xFE, 16 * sizeof(uint16_t)); |
|
memset (&b, 0xFF, 16 * sizeof(uint16_t)); |
|
assert(bitmap_compare(&a, &b) == 32); |
|
|
|
memset (&a, 0x00, 16 * sizeof(uint16_t)); |
|
memset (&b, 0x55, 16 * sizeof(uint16_t)); |
|
assert(bitmap_compare(&a, &b) == 128); |
|
|
|
memset (&a, 0x00, 16 * sizeof(uint16_t)); |
|
memset (&b, 0xAA, 16 * sizeof(uint16_t)); |
|
assert(bitmap_compare(&a, &b) == 128); |
|
|
|
memset (&a, 0xAA, 16 * sizeof(uint16_t)); |
|
memset (&b, 0x55, 16 * sizeof(uint16_t)); |
|
assert(bitmap_compare(&a, &b) == 256); |
|
|
|
memset (&a, 0x00, 16 * sizeof(uint16_t)); |
|
memset (&b, 0xFF, 16 * sizeof(uint16_t)); |
|
assert(bitmap_compare(&a, &b) == 256); |
|
|
|
return 0; |
|
}
|
|
|