Thomas,
The attached file shows a light weight, self contained, compile-time unit-test framework that I made. It allows tests to be collocated in the source with the associated functions under test, rather than spread over the file system in other files. If any of the unit tests fail at compile time, you get no object files/c files/exe, which I've not seen elsewhere. Closest thing I've seen that's comparable is Python's doctests, but mine is better, because I wrote it :-)
The file attached is one that I adapted from the following work that I did years ago: https://billsix.github.io/bug.html https://github.com/billsix/bug
Hope it helps,
Bill
On Mon, May 2, 2022 at 5:38 PM Thomas Hage thomas.hage@live.de wrote:
Hi,
I am learning Scheme on my own by exploring gambit by personal needs. Therefore there is a huge lack of experience on my side.
Prior to my current project I felt in love with Test Driven Development. Scheme enabled me to improve my workflow by programming interactive - sufficiating my own requirements. The downside is that I am unable to include unit test into my current workflow. Any advice would be appreciated.
In order to cover my current project in retrospective, I want to create tests (note that the usability of the provided test suite requires heavy exploration >:-) ). In both cases - testing afterwards or prior to implementing functionality - I am relying on branch coverage heavily. Since I am covering R5RS only, I am wondering if there is a test suite which can provide me with branch coverage (regardless of output formats/IDE's).
I am aware about the following two facts:
- In order to programming test-driven, a IDE suggestion
implementations is required (not required)
- the functional programming paradigm should enable me to cover
my code by determine the permutations of arguments. I want to support this with branch coverage, so that I suspend my current workflow and resume afterwards.
I am happy about sincerely feedback.
Thomas
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list