Added tests for most of the errors
Merge pull request #2 from jimmysong/errortest

Errortest