On Sep 18, 2011, at 8:21 PM, Luke Vilnis wrote:
I was wondering how to get test-engine working with #lang, or non-
student languages in general. I tried something like this:
#lang racket
(require test-engine/racket-tests)
(check-expect 12 (+ 6 7)) ;;sic
But no luck. I also tried it with (require test-engine/racket-gui),
but I'm guessing I must be missing something really basic here
because I can't even get it to work textually. I type (run-tests),
(test), (display-results), pretty much anything I can think of at
the repl, and I get nothing. It's as if all my output is going to
some hidden buffer somewhere. It works fine (sans the require)
using HTDP languages, so I don't think it's a problem with my install.
Did you try (test) at the end of the definitions pane?
In the student languages, check-expect is given the magical ability
to run automatically after a complete pass through everything else.
I haven't looked at the code for test-engine/racket-tests, but that
version of check-expect is less magical: it still doesn't run
immediately (so you can still put test cases for a function ahead of
the function's definition), but you have to explicitly say "(test)"
to get it to run at all.
Stephen Bloch
sbl...@adelphi.edu
_________________________________________________
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users