[Gambas-user] Crash with latest version

Jussi Lahtinen jussi.lahtinen at gmail.com
Thu Feb 11 01:02:25 CET 2021


On Thu, Feb 11, 2021 at 1:45 AM Christof Thalhofer <chrisml at deganius.de>
wrote:

> 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
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>

I don't quite follow your explanation. Can you give me an example project
on how to use it?
I did not say that the test suite causes side-effects, I said it prevents
them from being exposed.

The tester I have used (it has exposed a lot of bugs!) is in the software
farm with the name GambasTester.
I don't think it is translatable to the test suite as it has a very
different philosophy behind it.
I think your test suite is the best option for testing code you have
written with Gambas. And what I wrote is more like cumulative fuzzer output.


Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210211/98ae6ea1/attachment.htm>


More information about the User mailing list