[Gambas-user] Using test interface for scripter testing
chrisml at deganius.de
Sun Jun 28 10:54:07 CEST 2020
Am 28.06.20 um 10:00 schrieb Brian G:
>> AssertStdOut.Equal(Function(), "Expected",".....")
>> AssertStdErr.Equal(Function(), "Expected,"....")
>> Now I have to explain that most of the time, I replaced the 'got
>> value' with the actual function call from the tested module
> I don't see these basic functions as special, but normal checks for
> most libraries and components.
I have a lot of difficulties to understand your mail. IMO a part of it
is caused by your quoting style. Here for example you answer to sth Tobi
said, but you only quote your own sentences. So I have to read Tobi's
mail in parallel to understand what you are referring to.
gb.test looks at a project from inside the project and it reports it's
findings on Stdout. So a project that prints to Stdout by itself cannot
be tested with it in this way.
But you can use gb.test to write a program, that tests your project from
the outside. I told you how to do that.
gb.test is not intended to provide features that cover every specific
expression or state of a project. In reality, states covered by gb.test
can be broken down to True and False and contents of variables. And it
still looks to see if errors have occurred and reports that.
So, if you want to look at special properties of a project (for example
the number and names of exported symbols), you have to write test code
yourself that detects and examines these states and let gb.test compare
Dies ist keine Signatur
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the User