test/checks.ss
#lang scheme

(require "../require-provide.ss")

(require/provide (planet schematics/schemeunit:2:11/test)
                 (planet schematics/schemeunit:2:11/graphical-ui))

(provide check-contract-accept check-contract-reject)

(define-check (check-contract-accept contract value)
  (with-check-info
   (('contract contract)
    ('value value))
   (unless ((flat-contract-predicate contract) value)
     (fail-check))))

(define-check (check-contract-reject contract value)
  (with-check-info
   (('contract contract)
    ('value value))
   (when ((flat-contract-predicate contract) value)
     (fail-check))))