[fpc-devel]Recompile the RTL to trace bugs

Warren Postma wpostma at tekran.com
Mon May 3 20:41:04 CEST 2004


Is there a Unit Test for Dynamic Arrays? If not, perhaps the original 
poster could help to contribute one.  I use Dynamic Arrays heavily in 
Delphi and I'm just getting into FPC and Lazarus, and I'm very 
interesting in having a unit test for FPC Dynamic arrays to accomplish 
the following:

          (1)  Do all possible operations on Dynamic arrays, report 
total heap size before they are created, and after they are freed. (P.S. 
Is a debug-heap an option in FPC somewhere?).  Use dynamic arrays in 
record, class, and local function scope,  check recursion,  param and 
var param usage, etc etc. If FPC has range checking {$R+} like Delphi, 
perhaps tests for this can be created too.

          (2)  Be compilable via FPC and Delphi, and work identically on 
both, {$ifdef} where necessary.

          (3) Generally serve to either to locate any real problem (if 
one really exists), or to ensure that no accidental breakage can slip by 
undetected. If I have some time, I will write such a beastie as an 
exercise. If Yakov you have any code that exhibits the broken behavior, 
or you can contribute anything to this, it would be great.  Later, I 
want to figure out how to implement Packages in FPC, but I figure I may 
as well pick a baby-size idea first. This one sounds like it's easy.

Regards,

Warren Postma
Delphi Guy / FPC newbie.




         




More information about the fpc-devel mailing list