> > procedure TTestTIBaseObject.ValidFail1; > var > LO : TtiBaseObject; > begin > LO := TtiBaseObject(Random(20000)+2000); > writeln(' here we start'); // debug line > LO.TestValid(False); // <========== AV occurs here > writeln('passed 1'); // debug line > // check(not LO.TestValid(False)); > writeln('passed 2'); // debug line > end; > >
Here is a variation of the test above and it also never works under FPC, but does under Delphi. procedure TTestTIBaseObject.ValidFail2; var LO : TtiBaseObject; begin LO:= TtiBaseObject.Create; LO.free; {$IFNDEF FPC} check(not LO.TestValid); {$ELSE} check(True, 'FPC does not support this.'); {$ENDIF} end; Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel