void INInit(void); KWStatus INLoad(void);
foreach f in input/ run driver on f, saving output in act/f compare act/f with exp/f; report differences
input/test0: The C Programming Language The Cat in the Hat exp/test0: LSAddLine() LSAddWord(The) LSAddWord(C) LSAddWord(Programming) LSAddWord(Language) LSAddLine() LSAddWord(The) LSAddWord(Cat) LSAddWord(in) LSAddWord(the) LSAddWord(Hat)
void LSInit(void); KWStatus LSAddLine(void); KWStatus LSAddWord(char* word); const char* LSGetWord(int lineNum,int wordNum); int LSNumWords(int lineNum); int LSNumLines(void);
#define NUMLINES 5
#define MAWORDS 6
struct {
int numWords;
char* wordList[MAXWORDS];
} lineList[NUMLINES] = {
{5,"The","Cat","in","the","Hat"},
{4,"The","C","Programming","Language"}
...
};
for (i = 0; i < NUMLINES; i++) {
LSAddLine();
for (j = 0; j < lineList[i].numWords; j++) {
LSAddWord(lineList[i].wordList[j]);
}
}