fixes #22: assert number of expected errors in invalid tests