function assertChecks(constraintTiming, checkFn) {
  TIMINGS.forEach(function(timing) {
    if (timing == constraintTiming) {
      // Foreign key constraint violation on constraint {0}.
      lf.testing.util.assertThrowsError(203, checkFn.bind(null, timing));
    } else {
      assertNotThrows(checkFn.bind(null, timing));
    }
  });
}
Asserts that the given constraint checking function, throws a constraint
violation error for the given constraint timing, and that it throw no error
for other constraint timings.
@param {!lf.ConstraintTiming} constraintTiming
@param {!Function} checkFn