(import simple-tests) ;;; old interface (define-test (bar n) (positive? n) (even? n)) (define-test (foo x y) (< x y) "COMMENT" (bar 4) (odd? 3) (positive? 3)) (define-test (++) (= (+ 1 2) 3) (= (+ 1 2 3) 6)) (define-test (**) (= (* 1 2) 2) (= (* 1 2 3) 6)) (define-test (arithmetic) (++) (**)) (define-test (baz) (and? #t #t #t) (and?) (not (and? #t #f #t))) ;(compound-test (simple-tests) ; (baz) ; (arithmetic?) ; (foo 1 2) ; ) ;;; new interface (define-checks (bar? verbose? n 5) (positive? n) #t (even? n) #f) (define-checks (+? verbose?) (+ 1 2) 3 (+ 1 2 3) 6) (define-checks (*? verbose?) (* 1 2) 2 (* 1 2 3) 6) (define-checks (arithmetic? verbose?) (+? #f) #t (*? #f) #t) (define-checks (baz? verbose?) (and? #t #t #t) #t (and?) #t (and? #t #f #t) #f) (define-checks (qux? verbose?) ((== "x") "y") #f ((== "x") "x") #t ((== baz?) baz?) #t ((== baz?) bar) #f ((== '()) '()) #t ((== 'x) 'y) #f ((== 'x) 'x) #t ((== #(0 1 2)) #(0 1 2)) #t ((== #(0 1 2)) '(0 1 2)) #f ) (check-all SIMPLE (bar? #t) (*? #t) (+? #t) (arithmetic? #t) (baz? #t) (qux? #t))