[prev] 12 [next]

Making Programs Fail

Some techniques that you can use to exercise potential bugs:
  • make array sizes tiny   (#define SIZE 2)
  • write a special malloc that fails at random
  • initialize data structures with a value other than zero
  • test all possible combinations of parameter settings
  • supply empty input   (empty file, no argv values)
  • test on different compilers/machines/operating systems