#include #include "bits.h" int main(int argc, char **argv) { bv_set bits; unsigned int place; BV_ZERO(&bits); place=0; printf ("test 1... "); printf (BV_ISSET(place, &bits) ? "failed\n": "passed\n"); printf ("test 2... "); BV_SET(place, &bits); printf (BV_ISSET(place, &bits) ? "passed\n" : "failed\n"); printf ("test 3... "); BV_CLR(place, &bits); printf (BV_ISSET(place, &bits) ? "failed\n": "passed\n"); printf ("\n"); place=10; printf ("test 4... "); printf (BV_ISSET(place, &bits) ? "failed\n": "passed\n"); printf ("test 5... "); BV_SET(place, &bits); printf (BV_ISSET(place, &bits) ? "passed\n" : "failed\n"); printf ("test 6... "); BV_CLR(place, &bits); printf (BV_ISSET(place, &bits) ? "failed\n": "passed\n"); printf ("\n"); place=BV_SETSIZE-1; printf ("test 7... "); printf (BV_ISSET(place, &bits) ? "failed\n": "passed\n"); printf ("test 8... "); BV_SET(place, &bits); printf (BV_ISSET(place, &bits) ? "passed\n" : "failed\n"); printf ("test 9... "); BV_CLR(place, &bits); printf (BV_ISSET(place, &bits) ? "failed\n": "passed\n"); return 0; }