no need for mk-args
svn: r5352
This commit is contained in:
parent
e4bf3d4f47
commit
3cf7d2a55e
|
@ -247,26 +247,20 @@
|
||||||
(exn:fail:contract:variable-id x))))])
|
(exn:fail:contract:variable-id x))))])
|
||||||
(e #`(#,namespace-variable-value '#,id #t))))
|
(e #`(#,namespace-variable-value '#,id #t))))
|
||||||
|
|
||||||
(define (mk-args args)
|
|
||||||
(let loop ([l args])
|
|
||||||
(if (null? l)
|
|
||||||
""
|
|
||||||
(string-append " " (format "~e" (car l)) (loop (cdr l))))))
|
|
||||||
|
|
||||||
(define test-history-enabled (make-parameter #f))
|
(define test-history-enabled (make-parameter #f))
|
||||||
(define test-history (make-parameter null))
|
(define test-history (make-parameter null))
|
||||||
|
|
||||||
(define (format-history one-test)
|
(define (format-history one-test)
|
||||||
(if (test-history-enabled)
|
(if (test-history-enabled)
|
||||||
(format "(begin~a)"
|
(format "(begin~a)"
|
||||||
(apply string-append
|
(apply string-append (map (lambda (s) (format " ~a" s))
|
||||||
(map (lambda (s)
|
(reverse (test-history)))))
|
||||||
(format " ~a" s))
|
one-test))
|
||||||
(reverse (test-history)))))
|
|
||||||
one-test))
|
|
||||||
|
|
||||||
(define (check-proc e result equal? f . args)
|
(define (check-proc e result equal? f . args)
|
||||||
(let ([test (format "(~a~a)" f (mk-args args))])
|
(let ([test (format "(~a~a)" f
|
||||||
|
(apply string-append
|
||||||
|
(map (lambda (a) (format " ~e" a)) args)))])
|
||||||
(when (test-history-enabled)
|
(when (test-history-enabled)
|
||||||
(test-history (cons test (test-history))))
|
(test-history (cons test (test-history))))
|
||||||
(current-run-status (format "running instructor-supplied test ~a"
|
(current-run-status (format "running instructor-supplied test ~a"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user