static int IPPairBitTest03 (void) { int ret = 0; IPPairInitConfig(TRUE); IPPair *h = IPPairAlloc(); if (h == NULL) goto end; IPPairBitAdd(h, 0, 30); XBit *fb = IPPairBitGet(h,0); if (fb == NULL) { printf("fb == NULL although it was just added: "); goto end; } IPPairBitRemove(h, 0); fb = IPPairBitGet(h,0); if (fb != NULL) { printf("fb != NULL although it was just removed: "); goto end; } else { ret = 1; } IPPairFree(h); end: IPPairCleanup(); return ret; }
static int IPPairBitTest11 (void) { int ret = 0; IPPairInitConfig(TRUE); IPPair *h = IPPairAlloc(); if (h == NULL) goto end; IPPairBitAdd(h, 0,90); IPPairBitAdd(h, 1,90); IPPairBitAdd(h, 2,90); IPPairBitAdd(h, 3,90); XBit *fb = IPPairBitGet(h,3); if (fb == NULL) goto end; IPPairBitRemove(h,3); fb = IPPairBitGet(h,3); if (fb != NULL) { printf("fb != NULL even though it was removed: "); goto end; } ret = 1; IPPairFree(h); end: IPPairCleanup(); return ret; }
static int IPPairBitTest02 (void) { int ret = 0; IPPairInitConfig(TRUE); IPPair *h = IPPairAlloc(); if (h == NULL) goto end; XBit *fb = IPPairBitGet(h,0); if (fb == NULL) ret = 1; IPPairFree(h); end: IPPairCleanup(); return ret; }
static void XBitsTestShutdown(void) { HostCleanup(); IPPairCleanup(); StorageCleanup(); }