Exercise 1-11 How would you test the word count program? What kinds of input are most likely to uncover bugs if there are any?
I can test it on its own source code, like this:
# ./a.out < prog.c
The kind of input that would uncover bugs would be an input file that is:
* Empty (just EOF)
* Very long
* Containing long sequences of blanks, newlines and tab characters
* Containing unusual characters such as backspace, carriage return, or unprintable characters
No comments:
Post a Comment