[Gambas-user] Coming back to gb.test

Benoît Minisini g4mba5 at gmail.com
Sun Apr 5 13:06:30 CEST 2020


Le 05/04/2020 à 10:44, Christof Thalhofer a écrit :
> Am 03.04.20 um 01:30 schrieb Tobias Boege:
> 
>> Christof has reminded me what the critical points are:
>>
>> On Thu, 02 Apr 2020, Christof Thalhofer wrote:
>>> ----------------------------------------------------------------
>>> 1) Assert is now in gb.test.tap and not in gb.test. But this makes no
>>> sense because asserts must not be associated to the output format. In
>>> addition the flow of testing and assertions cannot be debugged inside
>>> gb.test any more.
>>>
>>
>> I agree with this. gb.test must contain the Assert module which provides
>> "high-level" assertions like comparing strings and printing diagnostics
>> when the test fails ("expected this string but got that string").
>>
>> But gb.test.tap should still export a *minimal* Assert module that just
>> contains Ok, Diag, BailOut, Todo, Skip and Subtest functionality.
>> gb.test builds its assertions on top of these primitives by extending
>> the Assert module. This allows TAP to be switched out for another format
>> as long as the other format's Assert module provides the above primitives.
>>
>> I think Benoît also suggested something along those lines, so we agree.
>> D'accord?
> 
> The more i think of it my doubts grow.
> 
> The test system core must have to be able to test itself to ensure it's
> reliability. Are "Ok, Diag, BailOut, Todo, Skip and Subtest" not
> essential parts of this core?
> 
> If one of them swallows things this is as bad as if an assertion does
> something wrong.
> 
> I would like it better if the test system is reliable in itself and
> spits out its results in the form of TAP (as transport format).
> 
> If we do the separation for fictional Gui, CVS, Log ... why can't they
> take TAP and convert it into their special output format?
> 
> Why should they have to provide essential parts of the test system as
> interfaces?
> 
> 
> Alles Gute
> 
> Christof Thalhofer
> 

You can use TAP as an interface: i.e., instead of relying on public 
method names, you rely on a text format. There is nothing wrong with 
that. Except if there is something missing in the TAP format.

-- 
Benoît Minisini


More information about the User mailing list