Added macro for testing error messages.

More tests should be added so feel free to check whatever you want.

Review by @vjovanov and @gzm0
You can get rid of that, once you adapted the signature :)