







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








z^
z^
z^
z^
z^
z^
error
finding a yet undiscovered bug.
before
software
z^
z^
combinations
z^
z^
z^
z^
z^
z^
z^
z^
z^
z^
z^
int main(){ int ret;char *ptr;int errorCount=0;assocTable *table;table = createTable(4);if (!table) {printf("ERROR: unable to create a table\n");exit(-1);} ptr = lookupTable(table, "foo") ;if (ptr) { printf("ERROR: found non-existent element foo in table\n");errorCount++;} ret = addTableItem(table, "foo", "bar");if (ret != 0) {printf("ERROR: AddTableItem returned an error\n");errorCount++;} ptr = lookupTable(table, "foo") ;if (!ptr || strcmp(ptr, "bar")) {printf("ERROR: unable to find element bar in table\n");errorCount++;} if (errorCount) {printf("Test simpleOps failed: %d sub-tests failed\n", errorCount);exit(-1);} else {printf("Test simpleOps passed\n");exit(0);} }