[Gambas-user] Crash with latest version

Christof Thalhofer chrisml at deganius.de
Thu Feb 11 00:44:20 CET 2021


Am 10.02.21 um 19:39 schrieb Jussi Lahtinen:
> 
>     You can even use the standard format used by 'gb.test' component.
> 
>     (I even guess Christof would tell you that it should be rewrite as a
>     'gb.test' test suite!)
> 
> 
> If I remember correctly, the test suite has flaw that make me not want
> to use it.
> It does run the tests as separate processes..? That greatly increases
> chances that possible side-effects will *not* be exposed.

I have to disagree. The test suite runs inside a program as it is and
inspects it from inside – it has the same position as every part of the
real program – think of it as an additional method which exists as long
as the test runs. Only the public interfaces inside the program itself
can be tested with it. This was made intentionally to prevent that it
can alter the behavior of the program itself.

You are not able to look into a method with gb.test, you can only test
whether a method creates the expected output.

As long as the programmer of tests does not alter the state of public
variables inside the program intentionally with tests it will always see
the program in a virgin state.

So there is no need to run every test in a separate process. Even more:
Running every test in a separate process would make real world unit
testing nearly impossible.

gb.test is an unit testing instrument which does the same as other unit
testing systems in other computer languages – less or more. This is a
well known concept which for sure has its limits. But none of them would
be prevented by running the tests (or parts of them) in separate processes.

The only side effects created by gb.test i can think of are timing
effects as the interpreter does some extra rounds with the cpu.

--------------

Jussi, if you want maybe I could help you to integrate gb.test into your
test program? At least – couldn't we try it out? For me it would be fun
and it would also be a good test for gb.test.

If we succeed we would make Gambas more stable with it.

:-)

Where is your test program?

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/20210211/b05133f9/attachment-0001.sig>


More information about the User mailing list