blob: 905d9189e46d86448c4348dbbcce67a95a8d09f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "counts.h"
#define NUM_TESTS 12
int main(void) {
char * testData[NUM_TESTS] = {"apple", "banana", NULL,"apple",
"frog","sword","bear",NULL,
"frog","apple", "zebra", "knight"};
counts_t * testCounts= createCounts();
for(int i =0; i < NUM_TESTS; i++) {
addCount(testCounts,testData[i]);
}
printCounts(testCounts, stdout);
freeCounts(testCounts);
return EXIT_SUCCESS;
}
|