[plt-scheme] Re: getting coverage info for test-engine/scheme-tests

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Sat Dec 12 21:19:41 EST 2009

I did, and was confused by it. So I want coverage info on another
module--I don't care about the test code, but about the code I'm
supposed to be testing.

Does the "top level" mean you can only use errortrace from mzscheme or
is there a way to have a program file install the handlers for another
program? There's this from the Quick Instructions

If you program is a non-module top-level sequence of definitions and
expressions, you can instead add
  (require errortrace)
to the beginning of the program or start MzScheme with the -l option
before the arguments to load your program:

but I'm not sure if that predates the creation of the Module language.
It used to be that modules were wrapped in (module ...), but now each
file is considered it's own module (I think).

I guess if I have to use the terminal, that's okay, but it seems
theoretically possible not to. (I'm also confused because the on?
settings after (coverage-counts-enabled ...) take any/c, so I'm not
sure if my boolean #t is correct or not.

I did read the appropriate parts of the documentation--I just didn't
get as much out of them as I needed.


On Sat, Dec 12, 2009 at 7:21 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> That error is some kind of a problem with errortrace (possibly just a
> missing contract check that would lead to a more informative error),
> but that's not how you use errortrace.
> Did you see the second paragraph at the top of the documentation for
> the errortrace library?
> Robby
> On Fri, Dec 11, 2009 at 8:09 PM, Todd O'Bryan <toddobryan at gmail.com> wrote:
>> Is there no good way to get coverage information on a file if the
>> tests are in a different file? How do people generally organize their
>> code? Am I missing something obvious about how to do this, and if so
>> could someone give me a link?
>> The error I'm getting is from trying what's described below is:
>> /opt/plt-4.2.3/lib/plt/collects/errortrace/errortrace-lib.ss:56:0:
>> context expected 1 value, received 2 values: () ()
>> On Thu, Dec 10, 2009 at 8:33 PM, Todd O'Bryan <toddobryan at gmail.com> wrote:
>>> I'm trying the following (what I believe to be quite sane) development
>>> methodology.
>>> I'm writing some modules and in the directory where the modules live,
>>> I've created a tests directory. Inside that directory, I have files
>>> that require the modules in the containing directory, exercise them,
>>> and then have test cases in the form of check-expects, etc.
>>> How can I get coverage information from the files in the main
>>> directory? I tried turning on the syntax highlighter, but I think that
>>> only works in the current file, so it doesn't help if the tests live
>>> in a separate file. I also tried following the instructions for the
>>> errortrace module, but didn't get very far. In particular, I put
>>> (require errortrace)
>>> (coverage-counts-enabled #t)
>>> at the top of a test file and
>>> (test)
>>> (annotate-covered-file "../filename.ss")
>>> at the bottom, and just got an error. Unfortunately, I have no idea
>>> what I should be putting to get the right information.
>>> Any help?
>>> Todd
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.