[fpc-pascal] TTestSuite

José Mejuto joshyfun at gmail.com
Fri Sep 2 15:14:16 CEST 2016


El 02/09/2016 a las 14:39, Graeme Geldenhuys escribió:

>> If the tests may show some kind of progress information
> I'm assuming you are talking about FPCUnit?
>
> If so, there is already a test progress listener implemented in the form
> of the TProgressWriter class (see the consoletestrunner.pas unit).
>
> Simply run your test suite from the command line and specify the -p (or
> --progress) command line parameter.

Hello,

Yes, but I'm writing the test so in code I can write something like:

if a=0 then FAIL('Value must not be 0');

And I wish to write something like:

if a>1 then MESSAGE('Value 2 or bigger is OK');
if a=1 then MESSAGE('Value 1 is quite dangerous');
if a=0 then FAIL('Value 0 is KBOOM!');

Because some test are sloooow and I like to have a screen feedback when 
running manually in the console, but if I use the writeln this 
information will pollute the generated XML to stdout. Maybe using stderr 
for progress messages will be valid and that's my question, will stderr 
cause pollution when the test is added to an automated test set ?

PS: I need to contact you out of the list about a project I'm finishing 
and that would be of your interest. My last try looking for your email 
(not mailinglists at ...) was unsuccessful and never get an answer. Could 
you please contact me to this email address ? Thank you.

-- 




More information about the fpc-pascal mailing list