[Cuis-dev] Enhancement proposal: Fail test when no assertion ran
Hernán Wilkinson
hernan.wilkinson at 10pines.com
Wed Apr 3 07:31:24 PDT 2024
Hi,
attached is a proposed enhancement to SUnit.
Now that SUnit is counting the number of executed assertions, I propose
that if no assertion is run then the test should fail because it means that
the test is not written correctly because a test without assertions is not
a test.
This check is done in other implementations of xUnit and helps newbies to
write better tests (at least to add an assertion :-) )
Do you think it makes sense to add it to our SUnit implementation?
Cheers!
Hernan.
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240403/d2110821/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6311-TestFailsWhenNoAssertedAnything-HernanWilkinson-2024Apr03-11h26m-HAW.001.cs.st
Type: application/octet-stream
Size: 453 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240403/d2110821/attachment.obj>
More information about the Cuis-dev
mailing list