[plt-scheme] test case boxes in drscheme (trying to abstrat over them)
Corey,
First of all, the uneditable box you're looking for now requires clicking
the little purple triangle to see. It's the 'actual' box where the result of
the test expression is shown.
Secondly, putting tests into a list does not currently work on purpose.
There's actually additional code disallowing test cases to appear in
non-definition contexts because the tool is aimed at the begining student
languages. The test-cases also don't evaluate to a value so that there's no
out put in the interactions window.
Implementing your feature request would require test-cases to evaluate to
their boolean values and have output in the interactions window and remove
restrictions of where the test-cases can go. Definitely no impossible but
would need some consideration of the pros and cons.
Thanks for your feed back. I hope you like the tool.
-mike
On Wed, Feb 02, 2005 at 10:44:36AM -0600, Corey Sweeney wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> 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
> `({test1}
> {test2}
> {test3}
> ...))
>
> (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
> etc.
>
> 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)
>
>
> Corey
>