[Gambas-user] Merge request for gb.test

Tobias Boege taboege at gmail.com
Tue Sep 10 20:43:02 CEST 2019


On Tue, 10 Sep 2019, Christof Thalhofer wrote:
> So that's what tests are for. When I program, I can use tests to check
> whether I have inadvertently destroyed crucial functions.
> 
> And I can even program "test-driven". I first write the test that tests
> a function and after that write the function itself, and I can be quite
> sure that I won't get tangled up as I continue programming:
> 

For me a major selling point of disciplined testing is that it makes
regressions impossible. If you find a bug, add a test while you fix it.
If you make passing the test suite a release or commit prerequisite,
you'll never ship the same bug twice.

Tests also have a normative character as Christof mentions. I've long
wanted the Gambas compiler and interpreter to have comprehensive test
suites, but have no time to create such a thing. If you think about it,
the Gambas language is woefully underspecified. The definition of
Gambas as a language is "whatever gbc3/gbx3 are doing at the moment".
Imagine writing your own Gambas compiler... the documentation doesn't
get you very far.

If all of Gambas was exercised with tests as much as possible, that
would also make it much clearer where exactly work is needed when porting
things to other systems, as was recently the topic with Mac OS X.

This is not really relevant to gb.test which would only reach components
written in Gambas (but that would not be too bad!), but it relates to
testing as a practice. And I would like that practice to catch on in the
Gambas world more.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190910/eda75e65/attachment.sig>


More information about the User mailing list