Hey all, I've been running into a lot of major roadblocks when it comes to writing good tests for some #langs that I've made, for a number of reasons.
Ideally, I want a function called (check-eq-program? "program1" "program2") That will run each program in a fresh module of my #lang, check what gets printed out, and compare them for equality. I'm not quite sure how to write a function that creates and runs code in a fresh module though. The fresh module is necessary for a number of reasons: If all of the programs worked in the same module, they would occasionally interfere with each other, as the #%module-begin's some of my #langs have initialize some "global variables" that need to be fresh/reinitialized every time a new program runs. Some languages also work with continuations, and if they all ran in one module, would alter control flow so that only one program could ever run (they have aborts in odd places). Ideally, the tests could be run in #lang racket instead of my own languages, so that the tests wouldn't be part of my language, so it probably makes sense that check-eq-program would have to take in a third argument for the language to use (check-eq-program prog1 prog2 lang) Rackunit sadly does not seem to have anything good for these kinds of tests. Can anyone offer some guidance on how to write a function like this, or if there's an easier way to go about this? Many thanks in advance. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.