[Gambas-user] Merge request for gb.test

Christof Thalhofer chrisml at deganius.de
Wed Sep 11 10:33:35 CEST 2019

Am 11.09.19 um 00:49 schrieb Benoît Minisini:

> I will start to merge it after the release of Gambas 3.14 (soon !).

Ok, very cool! Great!

> I just quickly look at your code, and I may suggest some changes in the 
> public interface of the component. I saw a lot of identifiers I don't like.

No problem, what I can do I will fix. If you can lead me, I can refactor
the code.

> Did you see that 'gb.util' adds a Class.Stat() static method that allows 
> to get some information about any project class without loading it? With 
> that you should be able to get all classes that inherits UnitTest.

Ok, thank you, I will have a look at it.

> There is no function that returns the list of project classes, but it is 
> just a metter of browsing the ".gambas" directory.

This is done in the code. Please have a look at GetAllTestContainerNames().

For the future:

The best would be, if there were a new type of class, a Test class.

gb.test should execute every method in it whose name starts with
"Setup[X]" and  "Test" in appropriate order, as it is done now.

To create a plan before testing ("1..X") – this is currently impossible
in the way Perl does it – it would be necessary to count every
occurrence of "Assert." in a test method.

I would like to implement that but I did not find a way to do it.

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/20190911/e5c3c443/attachment-0001.sig>

More information about the User mailing list