#define DEBUG #include "../include/except.h" #include "../include/mem.h" #include #include #include int main(void){ printf("\n\n"); printf("Testing memory allocation\n"); char *buf = ALLOC(100); TEST(buf != NULL); REALLOC(buf,200); char *str = NEW(str); TEST(str != 0); FREE(str); char *callocd = NEW0(callocd); TEST(callocd != NULL); FREE(buf); FREE(callocd); TEST(str == NULL); TEST(callocd == NULL); TEST(buf == NULL); FREE(buf); return EXIT_SUCCESS; }