[Gambas-user] Questions about gb.test and gb.test.tap

Benoît Minisini g4mba5 at gmail.com
Mon Feb 24 19:21:57 CET 2020


Hi,

This mail in mainly for Christof and Tobias...

What is the difference between gb.test and gb.test.tap?

I mean: for me gb.test should run the test modules and generate output 
in the TAP format, but what does gb.test.tap do?

Otherwise, as for running the tests from 'gb.test': As Christof said, 
the problem is that 'gb.test' cannot see the test modules if they are 
not exported. Which is somewhat logical.

But I don't want the test modules to be exported, they will pollute the 
global symbol table.

So I bring the following suggestions:

1) Adding a running test option to the interpreter. (Eventually use '-t' 
and find another name for the tracing option).

2) The running test option will have an argument that specifies which 
test modules to run (everything by default).

3) The interpreter in running test mode will not run the startup class, 
but will load every test module, and will run a global public method in 
an hardcoded global public class that must be implemented by the 
'gb.test' component. For example "Test.Main". It will receive the class 
objects in argument. This is how it will be able to access non-exported 
test modules and run them.

4) The '.test' file created by the compiler is still needed. It will be 
used by the interpreter to find the test modules.

5) That way anyone can implement another test system, provided that it 
implements Test.Main().

6) I guess the test modules should have common public methods to be used 
by 'gb.test'. Can it be made standard? If not, it's not a big deal, as a 
different test system will have different assertion methods.

What do you think?

-- 
Benoît Minisini


More information about the User mailing list