[Gambas-user] gb.test

Christof Thalhofer chrisml at deganius.de
Fri Mar 6 09:35:25 CET 2020


Hi,

in master there are now gb.test and gb.test.tap. These two play well
together as far as I can see. But a part of the functionality has
disappeared and must therefore be restored:

Now in Testme.Main()

UnitTest.Main("TestFailures", Null, True, True)

stops the program without output.

Instead it has to report errors and crashes inside the tested project
and run through until the end. Every test in it has to report "not ok"
and some diagnostics.

This has to be done by encapsulating every "Object.Call" in gb.test with
"Try" in a way like this:

-------------------------------------------------------------
Try Object.Call(...
If Error Then
   Assert.Ok(False, "Raised error: " & Error.Text)
   Error.Clear
End If
-------------------------------------------------------------

Also it should report the place where the error happened.

So that errors and crashes in testcode and tested code are reported as
"not ok" but errors in gb.test itself lead to a bailout.

Who wants to restore it? Should I do it?

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/20200306/a97e51ae/attachment.sig>


More information about the User mailing list