[Gambas-user] Using test interface for scripter testing

Christof Thalhofer chrisml at deganius.de
Mon Jul 6 08:44:26 CEST 2020


Hello Brian,

Am 30.06.20 um 01:38 schrieb Brian G:

> Assert.Exported("namelist",......... ) ' list of expected exported
> modules and classes fails if don't match 

> Assert.Interface("modOrClass", "interfaceFuncOrVarsOrProperty".....)
> ' test exported mods or classes that the interface is correct ie
> public functions and variables exposed, returns

I find these things useful. If you are interested in enhancing gb.test
then it should be done like this:

To ensure it's stability gb.test tests itself so at first you should
write tests for gb.test that require the new methods:

Assert.Interface("ExistingClass", "ExistingSymbol")

There should also be tests that test the right behavior on failure, like
this:

Test.IntendedFailure
Assert.Interface("NotExistingClass", "AnySymbol")

Test.IntendedFailure
Assert.Interface("ExistingClass", "NotExportedSymbol")

These tests must be part of the testsuite "All good" in gb.test.

After that write the methods in 'Assert' that meet the requirements,
they should be well documented.

--------------------------------------------------------------------

To bring your work into Gambas you must fork Gambas on Gitlab, commit
your changes and then create a merge request.

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/20200706/4e7b1a91/attachment.sig>


More information about the User mailing list