[Gambas-user] New component gb.test
Tobias Boege
taboege at gmail.com
Sun May 20 20:04:46 CEST 2018
On Sun, 20 May 2018, Christof Thalhofer wrote:
> The only thing I really do not like at all is your Assert.Setup(Integer)
>
> A programmer should not have to count with fingers.
>
That's fine, you can leave it out. The TAP specification says:
The plan tells how many tests will be run, or how many tests have run.
[...]
This is a safeguard in case your test file dies silently in the middle
of its run.
If you don't Setup, the TapPrinter will keep track of the number of tests
you ran and spoof a plan at the end. Currently you have to call the
Finish() method for it to do that. Given how the Assert module is used,
maybe that should be made automatic somehow.
[ Actually, I think the TapParser doesn't throw an error yet if it doesn't
encounter a plan line, which is a nuance I have likely overlooked. ]
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list