[Gambas-user] Crash with latest version

Christof Thalhofer chrisml at deganius.de
Sun Mar 7 11:32:04 CET 2021


Am 07.03.21 um 02:23 schrieb Jussi Lahtinen:

> I think there needs to be some cleaning. 

Yes for sure.

> mTest is basically not used
> anymore, all the references to it can be moved to GambasSelftests, etc,
> right?

Not always. In a test module every method is a test and will be
executed, except it's name starts with '_'. As long as we can move the
methods to 'GambasSelftests' and refactor their names to use a heading
underscore, we could do that. But I think it would make
'GambasSelftests' even more confusing. Basically I'm fine with a
testmodule that contains only tests.

What I really do not like at all is that 'FastTests' contains more that
2500 LOC. This is what it makes it really messy. I'd like it much more
if every tested symbol had it's own testmethod. That would be a lot of
work but it would clean out the mess and would help a lot for the future.

This:

> ... 'lot of code
> sDescription = "Test If False"
> ... 'lot of code

Would become:

> Public Sub TestIfFalse()
> ' small amount of code
> ' with appropriate assartions
>
> End

...

Also the global variables in GambasSelftests are confusing. Are they
really necessary?

> And then TestTester() should be modified to read all the sources that
> are actually executed, otherwise it is useless.

Yes.

> I have been thinking of fetching the SearchList content from
> https://gambaswiki.org/wiki/lang ... not sure.

We can ask Benoît to give us a hint how to get a list of all commands in
the Gambas language. How it is done in the Wiki? By hand? Really?

> Normally when I run the tester (the old version), I run it once without
> JIT and second with JIT. And the third time with a different language /
> localization.
> At least the JIT & no-JIT runs are important.

This is the first problem we should solve before we try to refactor all
the mess.

Hmm ... how can we achieve that this is done automatically?

Move all tests to a standard module and then call the tests from two
different test modules, one with and one without 'Fast'?

I'm unsure because I have no experience with JIT.

------

If we work together we could use a tool which helped Tobi and me to
organize the things to be done with gb.test. It's called 'taskell' and
stores it's data in a file like this:

main/lib/test/gb.test/taskell.md

https://taskell.app/

It's in Ubuntu. Is this ok for you?

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: <http://lists.gambas-basic.org/pipermail/user/attachments/20210307/9bc579d4/attachment.sig>


More information about the User mailing list