[Gambas-user] Coming back to gb.test

Christof Thalhofer chrisml at deganius.de
Fri Apr 3 08:09:55 CEST 2020


Am 03.04.20 um 01:30 schrieb Tobias Boege:

> Now, suppose we don't have gb.test catch errors from test methods. What will
> happen is that the interpreter just dies. It will print the error message
> and where it was raised to stderr and terminate with a non-zero exit code.
> This is pretty much the information that you inject into the TAP stream
> (except the error location we get from the interpreter's message is where
> the error happened exactly, not necessarily the test module/method name).
> The test harness gets this information in this scenario as well. The only
> thing that doesn't happen is that testing continues with the next test
> method, which is alright I would say -- *except* when you want to run a
> test like your TestFailures.test which must fail and must raise errors
> to test that gb.test catches them appropriately. But when gb.test doesn't
> include error catching logic, this test can simply be removed!

No! I even wanted to go further.

For the future I had in mind that TestFailures.test reports good, if
every test in it failed which now must be recognized by the programmer
"by hand".

As a reverse test result. This is necessary if you test code that you
expect to crash in certain circumstances as a last resort.

gb.test should only BailOut and stop if it crashes itself.
But every crash in tested code should report not ok.

I did not write this test just for a joke.

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/20200403/00976b56/attachment-0001.sig>


More information about the User mailing list