[fpc-devel] patch testreport

Tomas Hajny XHajT03 at mbox.vol.cz
Sun Aug 13 21:14:08 CEST 2006


On 13 Aug 06, at 20:25, Darius Blaszijk wrote:
> From: "Michael Van Canneyt" <michael at freepascal.org>
> Sent: Sunday, August 13, 2006 7:10 PM
> > On Sun, 13 Aug 2006, Darius Blaszijk wrote:
> >
> >> Hi Michael,
> >>
> >> Thanks, but I have a question.
> >>
> >> Following the testreport patch, I have also a patch for the 
> >> FPCUnitLazIDEIntf
> >> to make use of the plain text output. But I need to put defines around 
> >> the new
> >> option, so people with an older FPC version do not get a broken tool. 
> >> What
> >> defines would that be?
> >
> > {$IFNDEF VER2_1}
> >  // text output
> > {$ELSE}
> >  // XML output.
> > {$ENDIF}
 .
 .

Would this really provide the wanted behaviour? 
I'd be very careful with using $IFDEF 
VER<minimum_supported_version> rather than $IFDEF 
VER<unsupported_versions>. The proposed version 
would only work for trunk snapshots (and only for 
sufficiently recent ones, of course). Any time a 
new release based on trunk is made available, 
this would stop working (and I doubt that anybody 
would remember to change it at that time). My 
recommendation would be to use either:

{$IFDEF VER2_0}
  // XML output only
{$ELSE}
  // text output allowed
{$ENDIF}

(if nothing older than 2.0 is supported anyway - 
I guess this is the case here) or possibly:

{$IF defined(VER2_0) or defined(VER1)}
  // XML output only
{$ELSE}
  // text output allowed
{$ENDIF}


Tomas



More information about the fpc-devel mailing list