Added macro for testing error messages.

More tests should be added so feel free to check whatever you want.

Review by @vjovanov and @gzm0
Minor thing. There is also a newline missing. @gzm0 thought me that.