1. A method of automatically generating a set of test layouts for testing a design rule checking tool, wherein a layout is a point in a space of several coordinates, and the design rule comprises N design constraints numbered 1 to N, wherein N is greater or equal two and each design constraint is a boolean-valued function of one or more of the coordinates, and wherein the set of test layouts includes: one or more zero-error layouts; one or more one-error layouts; and one or more two-error layouts; wherein a zero-error layout is a layout that satisfies all of the design constraints, a one-error layout is a layout that violates exactly one of the design constraints, and a two-error layout is a layout that violates exactly two of the design constraints.