[Gambas-user] Crash with latest version
Jussi Lahtinen
jussi.lahtinen at gmail.com
Thu Feb 11 22:09:41 CET 2021
> What kind of side effects do you need?
>
I mean, sometimes bugs show up only later after executing some "innocent"
code.
Thus the interpreter state should not be "cleared" unnecessarily.
> Because gb.test does *not* start a new process for every test unit, as I
> think that you think. All tests run in the same process. What you maybe
> remember is that there are two processes involved in testing: a program
> that runs the tests and a program (usually the IDE) that captures and
> parses the output of the test running process and judges whether the test
> passed or failed.
>
OK, my misunderstanding. So the process is started again only after testing
a deliberate crash. Not an issue.
> What gb.test cannot do: catch segfaults and such really bad interpreter
> crashes and report them as failed tests. I take it that your tester cannot
> do this either.
> However, because of the separation of test runner (1) and
> test harness (2) in gb.test, the harness (i.e. the IDE) will detect even
> segfaults and report them as unsuccessful test runs. I suppose in your
> tester, the harness are the two eyes of the user in front of the screen.
>
I usually run the tester from script and the exit code tells if everything
went OK.
>From a glance at your code, I don't think that it is incompatible with
> gb.test, ...
>
It's a huge ugly mess. Everytime I run into real world problems I add code
to it based on what might cause the problem or what certainly causes the
problem or both.
I try to test every keyword at least with a very simple test (the part that
is a bit more gb.test style approach). Everything is very quick and easy to
add to it. No maintaining worries, just add more and don't touch old if you
don't know what they should do. With some sensible order, variable names,
documentation, etc... uh. I have sacrificed all that in the name of
practicality and easiness (not something I would recommend for anything
else, because usually it is not really possible). And it is still the only
unit tester(?).
The code is free to use, if someone is upto the task.
Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210211/47ab773c/attachment.htm>
More information about the User
mailing list