From 96a9a1fc8fca1a53507bb609ac7273af9e2c7a81 Mon Sep 17 00:00:00 2001 From: John Clements Date: Fri, 11 Apr 2014 09:22:10 -0700 Subject: [PATCH] comments, rackunit-y --- .../htdp-test/tests/stepper/annotation.rkt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/htdp-pkgs/htdp-test/tests/stepper/annotation.rkt b/pkgs/htdp-pkgs/htdp-test/tests/stepper/annotation.rkt index 6280121ead..187ebdfec2 100644 --- a/pkgs/htdp-pkgs/htdp-test/tests/stepper/annotation.rkt +++ b/pkgs/htdp-pkgs/htdp-test/tests/stepper/annotation.rkt @@ -2,12 +2,20 @@ (require stepper/private/annotate "test-engine.rkt" - "language-level-model.rkt") + "language-level-model.rkt" + rackunit) + +;; this is a pathetic "set" of tests, but I just spent time debugging +;; a problem that would have been caught by this test, so I'm adding +;; it anyway. More generally, it might be nice to take every test in +;; the through-tests suite and make sure that it can be annotated without +;; failure before trying to run it. (define (try-annotating str) (define expanded (car (string->expanded-syntax-list intermediate str))) - (printf "expanded: ~s\n" expanded) + ;(printf "expanded: ~s\n" expanded) (annotate expanded (lambda (a b c) 'bogus) #f)) -(try-annotating "(check-expect 2 2)") \ No newline at end of file + +(check-not-exn (lambda () (try-annotating "(check-expect 2 2)"))) \ No newline at end of file