[Gambas-user] Using test interface for scripter testing

Christof Thalhofer chrisml at deganius.de
Tue Jun 23 08:49:25 CEST 2020


Am 23.06.20 um 08:22 schrieb Brian G:

> I seem to be writing more code to test the darn thing , than code in the darn thing...

:-)

Yes, sometimes testing is quite expensive ... but as a benefit you will
be sure that your code does what you have defined it has to do. It makes
your code more reliable ... for a long time. It prevents you from
destroying functionality in your (tested) code by accident later.

In your example you mix code to be tested and testcode in a testmodule.
That's not the way it is thought. If you do TDD you first write a
testmodule with testmethod(s) and after that the production code in
*separated classes*.

Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200623/230b53a8/attachment.sig>


More information about the User mailing list