A computer-implemented method for automated generation of test layouts for verifying a DRC deck. The method comprises receiving a first layout (L1) comprising one or more polygon shapes (P1) defined by a plurality of polygon parameters (W1,H1). Design rules (R1,R2) are received comprising inequality constraints (C) on the polygon parameters (W1,H1). A second lay-out (L2) is calculated by applying a random change (ΔW12) of value to at least one of the polygon parameters (W1) of the first layout (L1). A third layout (L3) is calculated by varying values of the polygon parameters (W1,H1) of the second layout (L2) until a respective slack (S1,S2) of the polygon parameters (W1,H1) with respect to one or more of the parameter boundaries (B1,B2) defined by the constraints is minimized The third layout (L3) may be stored as candidate test layout.