Simplify logic in TestCheckErrors.
Merge pull request #53 from velour/testlogic

Simplify logic in TestCheckErrors.