It's hard to test a program as a black box because all a tester can do is stuff things into the program and watch what pops out. It's like trying to determine whether somebody is insane. You ask questions; you listen to answes; and you make a judgment call. In the end, you are never really sure because you don't know what's going on inside the other person's head. You alwasy wonder, "Did I ask enough questions? Did I ask the right questions?"
Dont' rely on black-box testing. Try to mimic that hypothetical compiler. Eliminate luck and take every opportunity to catch bugs automatically.