[Gambas-user] Coming back to gb.test

Tobias Boege taboege at gmail.com
Fri Apr 3 18:49:09 CEST 2020


On Fri, 03 Apr 2020, Christof Thalhofer wrote:
> Am 03.04.20 um 14:22 schrieb Benoît Minisini:
> 
> > Maybe I will say rubbish, but if both can be useful, couldn't we make
> > that an option ? "Let gb.test catch all errors" or "let the interpreter
> > crash".
> 
> In theory yes, in reality not.
> 
> I tried to restore this functionality in the current gb.test, but even
> if it's there, TestFailures.test does not run trough, but just 7 of 11
> tests, as I remember [1]. I found out that there are further things in
> the assertions that do not what they should do.
> 
> But these cannot debugged, because Assert is not in gb.test any more and
> so cannot be stepped through ...
> 
> I have a few hundred tests for my code at home but I cannot run these
> with the new gb.test because Tobi decided to change Got and Expected in
> the signatures of the assertions to be the other way round as it was
> before. So with the new gb.test I would have to change hundreds of test
> calls in my own software ...
> 

We already talked about this in private. It was not a conscious decision.
Assert.Equals(Got, Expected) is simply how all TAP producers order their
arguments and how people usually write comparisons in If statements.
The API is not final either. This is Gambas HEAD.

> ... hmmm ...
> 
> for sure I would do this if the new gb.test was reliable, but it is
> obviously not.
> 
> So from my own perspective the current state of this thing is a complete
> mess :-(
> 

I started this thread with a list of problems I was made aware of and
which I was going to tackle on the weekend. These problems popped up
after we seemed to agree on everything and my branch got merged.

What I mainly wanted to discuss in the opening mail is the Try-Catch
business and the flowchart. But you brought up a bunch of other things
you are not content with that I'm honestly wondering if we should go
forward at all or just revert to the state of four years ago.

I made a list of the things you mentioned and will work on them tomorrow
in the way I think is best -- on a separate branch, no pull requests,
no merges. After the bugs in TapPrinter are fixed, which has to happen
anyway if we don't want to revert to Print statements scattered all over
gb.test, I do think that the gaps between what I would like and what
you would like are not that hard to jump over. Benoît can feel free to
make binary decisions about what's best in the end. That said, I have
never been so tired of arguing. I'm just gonna see for myself how my
ideas perform in practice.

Speaking of which: could everyone read the flowchart in the end or
should I make one with computer letters?

Regards,
Tobias

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list