Improve tests of error detection in generator