[Gambas-devel] Suggestion : Gambas Unit Testing

Benoît Minisini gambas at ...1...
Tue Dec 9 22:45:01 CET 2014


I like the Tobias' idea of "just" comparing the result of a unit test 
with a text file, like in Python. I wrote "just" because there must be 
some pattern matching magic in the comparison.

But I prefer the Adrian way of coding all the tests inside the project.

I can add a new special hidden directory for storing the "UnitTests". It 
will be compiled like the rest of the code, and will be put inside the 
executable. It will be run by a special option of gbx3 / gbr3.

For example, if you have a "gb.abcd" component, you will run something like:

$ gbr3 -t gb.abcd.gambas

to execute the unit tests and check the result.

Moreover, we can make "UnitTest" a new "form" type in the IDE. We could 
store the code to test in the class, that class automatically inheriting 
the UnitTest class. And the form file would be just the textual result 
that must be emitted by the tests.

What do you think about that?

-- 
Benoît Minisini




More information about the Devel mailing list