[Gambas-user] Test Module, First try

Brian G brian at westwoodsvcs.com
Sun Jul 19 00:58:45 CEST 2020

Great Thanks, I used your suggestions and moved it to the TSR module which already had a number of my helper functions
I ran into one issue though.

I attach the final...hopefully acceptable style wise version!

When I delete a test module, the default or any other test suite does not recalculate itself, 
It will crash BailOut , because the test is missing, It is required to use shift-F4 to enter the default plan
then exit it. This corrects the issue.

Is it possible to fix this so that it is automatic and it detects that a test is missing
and give opportunity to fix or bail?

Its not intuitive from the message what needs to be done to fix the issue.

Thank You
Brian G

----- Original Message -----
From: "Christof Thalhofer" <chrisml at deganius.de>
To: "Gambas mailing list" <user at lists.gambas-basic.org>
Sent: Saturday, July 18, 2020 5:40:25 AM
Subject: Re: [Gambas-user] Test Module, First try

Am 18.07.20 um 11:19 schrieb Brian G:

> Point out the error of my way!

I see a design flaw:

'TaSetupForAllTests' is not really a test. Is tests nothing but creates
an environment.

If you want to do sth like that it is better to create a helper
module/method and call that in each testmodule via _Setup() individually.

So you can ensure that the environment is already created even when you
run a single testmethod in a separated testsuite.

Look at the project I have attached.

Alles Gute

Christof Thalhofer

Dies ist keine Signatur

----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gbs3-3.15.90.tar.gz
Type: application/x-compressed-tar
Size: 37605 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200718/9ab6863c/attachment-0001.bin>

More information about the User mailing list