cosmetic changes only

This commit is contained in:
John Clements 2010-10-20 12:04:52 -07:00
parent 34fbc9a06f
commit d18f43a488
2 changed files with 16 additions and 7 deletions

View File

@ -5,7 +5,9 @@
(let ((outer-namespace (current-namespace)))
(parameterize ([display-only-errors #t]
[current-output-port (open-output-string)]
;; display-only-errors is insufficient, because the evals
;; actually cause output. So we just eat stdout.
[current-output-port (open-output-string)]
[current-namespace (make-base-namespace)])
;; make sure the tests' print-convert sees the teaching languages' properties
#;(namespace-attach-module outer-namespace 'mzlib/pconvert-prop (current-namespace))

View File

@ -23,7 +23,10 @@
[(list name models string expected-steps)
(when (assq name list-of-tests)
(error 'add-test "name ~v is already in the list of tests" name))
(set! list-of-tests (append list-of-tests (list (list name (list models string expected-steps)))))]))
(set! list-of-tests
(append list-of-tests
(list (list name
(list models string expected-steps)))))]))
(define (t1 name models string expected-steps)
(add-test (list name models string expected-steps)))
@ -1460,23 +1463,27 @@
(t 'local-struct/i m:intermediate
(define (f x) (local ((define-struct a (b c))) x)) (f 1)
:: (define (f x) (local ((define-struct a (b c))) x)) {(f 1)}
-> (define (f x) (local ((define-struct a (b c))) x)) {(define-struct a_1 (b c))} {1})
-> (define (f x) (local ((define-struct a (b c))) x))
{(define-struct a_1 (b c))} {1})
(t 'local-struct/ilam m:intermediate-lambda
(define (f x) (local ((define-struct a (b c))) x)) (f 1)
:: (define (f x) (local ((define-struct a (b c))) x)) {(f 1)}
-> (define (f x) (local ((define-struct a (b c))) x)) {((lambda (x) (local ((define-struct a (b c))) x)) 1)}
-> (define (f x) (local ((define-struct a (b c))) x)) {(define-struct a_1 (b c))} {1})
-> (define (f x) (local ((define-struct a (b c))) x))
{((lambda (x) (local ((define-struct a (b c))) x)) 1)}
-> (define (f x) (local ((define-struct a (b c))) x))
{(define-struct a_1 (b c))} {1})
;; run whatever tests are enabled (intended for interactive use):
(define (ggg)
(parameterize (#;[disable-stepper-error-handling #t]
(parameterize ([disable-stepper-error-handling #t]
#;[display-only-errors #t]
#;[store-steps #f]
#;[show-all-steps #t])
#;(run-tests '(check-expect forward-ref check-within check-within-bad check-error check-error-bad))
#;(run-tests '(check-expect forward-ref check-within check-within-bad
check-error check-error-bad))
#;(run-tests '(teachpack-universe))
#;(run-all-tests)
(run-tests '(check-expect))))