[fpc-pascal] Free Pascal soom will land in Italy!

Dean Zobec dezobec at tin.it
Sun Oct 10 14:00:18 CEST 2004


Michael,
> > > I've converted the EOS code  (http://sourceforge.net/projects/camelos)
> > > to fpc in a couple of days with only minor changes from Delphi and
> > > translated the Junit core testing framework from Java in a day or too:
> > > http://camelos.sourceforge.net/fpcUnit.html ,  so,
> >
> > I am interested in fpcUnit. Where can I download the source for fpcUnit.
> > The tar.gz on http://camelos.sourceforge.net/fpcUnit.html only contains
> > the gui test runner, not the base classes, like TestCase. I tried to
> > find it at cvs, but couldn't.
>
> I think it would be even good to include it with FPC itself, in the FCL.
> As far as I know, the test classes themselves don't need any GUI
> functionality ?
You're right, like in JUnit, no GUI functionality is really needed for the 
tests, I usually run the tests from the command line, by writing a simple 
console program like this:

  RegisterTests([TMyFirstTest, TMySecondTest, TMyThirdTest ....]);
  RunRegisteredTests;
  writeln(GetResultsAsXML);

see the tests of the fpcUnit itself for a complete example:
http://cvs.sourceforge.net/viewcvs.py/camelos/EOS/Apps/fpcUnit/tests/runtests.dpr?rev=1.10&view=log

I'll be very happy to see it included in the FCL as a humble contribution to 
my preferred compiler. For the occasion I could write a command line template 
program for the running of the tests and insert some command line arguments 
to be able to choose different formats for the results (xml or plain text for 
example).
The code ha a dependency on the EOS library for the automatic xml 
serialization that is probably unnecessary and I think I can easily remove 
it. I can send you a streamlined FPC version by the end of the month for an 
evaluation.

Thank you again for your constant effort in the FPC development.
Regards,
Dean




More information about the fpc-pascal mailing list