[plt-scheme] test case boxes in drscheme (trying to abstrat over them)

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Wed Feb 2 11:44:36 EST 2005

Hi.  I've lately been having a lot of fun with the test case boxes
that can be inserted with drscheme.  I've found them pretty cool, as
my code used to spew out screen after screen of test cases as i'd
develop it.

Now I'm wanting to get more sophisticated.  I now have multiple
functions that take the same test cases as my original function that i
was developing.  I temporarily stopped using the test boxes, and using
the old "display way" i did:

(define positive-test-cases

(map (PC? positive-test-cases)

(obvioulsy {testx} and ... are meta code to shorten the emails length)

now when converting this to test boxes, i can make test boxes that do:
test-box-1 == (PC? (list-ref positive-test-cases) 0) = #t
test-box-2 == (PC? (list-ref positive-test-cases) 1) = #t
test-box-3 == (PC? (list-ref positive-test-cases) 2) = #t

however, seeing (PC? (list-ref positive-test-cases) 0) in the test
box, is not very informative.  It would be much better to have the
actual test presented there.  Now section 2.10 in the help desk
mentions there being 3 editable areas in the test box, and one
uneditable one.  I only find 2 editable areas... the expression to
test and the "expected output".  The one i'm missing is supposedly the
"title" which i the data could possibly be put in.

So ideally i'd like to have a function that when the function was
executed, it would update the labels of all the test cases in the
source.  It might not be worth it, but how hard would it be to do
something like that?  and how do i access the labels at all?

(i'm using 299v29)


Posted on the users mailing list.