[Gambas-user] New component gb.test

Christof Thalhofer chrisml at deganius.de
Mon May 21 22:46:35 CEST 2018


Am 21.05.2018 um 21:28 schrieb Tobias Boege:
> On Mon, 21 May 2018, Adrien Prokopowicz wrote:
>> There's something I just noticed in your implementation: why is a "test" (in
>> TAP terminology) mapped to a single assertion, and not to a whole test
>> method ?
>>
> 
> There are two things that might be called a "test". One is a single
> assertion, which produces an "ok" or "not ok" line, and the other is
> multiple assertions bundled into a file -- that file would be called
> a test, too, if you ask me.

An assertion is not a test, it is a tool which is used inside a test to
decide whether the test fails or not.

One test can contain multiple assertions, if one is not true, the test
fails. The test also fails, if there is an error.

Look at the picture. There are four tests, each failing, because an an
assertion was not true or an error occured.

Tests can be huge, but then they usually contain more than one assertion.

As I know it, one single test is handled in a testmethod which can
contain one or multiple assertions. This testmethod can executed alone
or together with other testmethods one after another.


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tracer.png
Type: image/png
Size: 30227 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180521/05174702/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180521/05174702/attachment-0001.sig>


More information about the User mailing list