
To those who are RackUnit experts, I’m asking for some clarification. When I run raco test somefile.rkt, it executes tests and then at the end of its output, it prints something like “7/72 test failures”
I’ve noticed that when I introduce errors on purpose, the denominator number often vary quite a lot which puzzled me at first. Eventually I concluded that the reason for changing denominator number is when a test fails in a test-case form, rest of the tests after the failing test do not run and do not get counted in the total.
So the fraction that gets printed really means how many failing tests out of total number of tests run to date, not how many tests actually written in the source file.
My question is, is there a way to configure raco test to print number of all tests it detects in the source file as opposed to just those that were able to run?
In addition, am I correct in surmising that only forms in the check-* family count as tests?

@abmclin: to your second question, yes, that’s what “tests” means

for the first question, no, you can’t do that, because it doesn’t work by “detecting tests in the source file”

it runs the source file, and each time it runs a test, it adds to the count

it doesn’t look at the source at all

Ok understood, thank you @samth. I didn’t want to misinterpret the numbers I was seeing. Out of curiosity, raco test doesn’t try to look at the source file before running because it’s impractical to try to detect test cases in advance?

@abmclin yes, tests could be generated by macros, or created at runtime, for example

For example, I’ve written tests in Typed Racket that construct a test for each file in a directory

ok got it, yeah that does make it pointless to try to do a static guess of total number of tests.

anyone have advice on debugging “desc: identifier’s binding is ambiguous context…: matching binding…: matching binding…: in: desc” in a macro-generating macro?

my solution has mostly been to stare at it very hard until I figure out what’s going on, potentially reducing it to a minimal case that reproduces the problem. so I guess my answer is “no, I don’t have any good debugging advice”.

i can’t seem to reproduce in a smaller example either :disappointed:


thanks @lexi.lambda and @ben. debug-scopes gave me just enough info for staring at it to tell me the answer. i was a little surprised though: my macro used defined a name that wasn’t available outside the macro, but was getting reused between macro invocations, causing the issue. replacing that name with a gensym’d generate-temporaries name fixed the problem. i was surprised because this seems less hygienic than I expected.

What has happened to https://racket.slackarchive.io/ ? I got: “Team by domain "racket” not found." when I try it.

@githree looks like a general problem: https://twitter.com/search?f=tweets&vertical=default&q=slackarchive

OK, thanks