[fpc-devel] Definition of the time-fration in a TDateTime before 30/12/1899

Joost van der Sluis joost at cnoc.nl
Tue May 23 15:33:00 CEST 2006


On Tue, 2006-05-23 at 14:41 +0200, Florian Klaempfl wrote:
> Michael Van Canneyt wrote:
> > On Tue, 23 May 2006, Florian Klaempfl wrote:
> >> Peter Vreman wrote:
> >>>> Michael Van Canneyt wrote:
> >>>>>>>>> 1. fpcunit didn't exist at the time the FPC tests were
> >>>>>>>>> implemented.
> >>>>>>>>> 2. Using FPCunit creates a dependency on it. The tests can run
> >>>>>>>>> mostly
> >>>>>>>>>    with only the system unit...
> >>>>>>>> Which dependencies? Maybe they can be reduced and a fpcunit can be
> >>>>>>>> added to tests?
> >>>>>>> fpcunit depends on not so much, but I want to avoid using the FCL in
> >>>>>>> the
> >>>>>>> testsuite... Creating a copy seems rather silly too...
> >>>>>> You can create an svn:external to important that one from the fcl
> >>>>>> without
> >>>>>> creating a real copy.
> >>>>> Good idea.
> >>>>>
> >>>>> Should we convert existing tests to fpcunit ?
> >>>> No, too much work, no real gain :)
> >>>
> >>> I agree here. New tests can be added with fpcunit. But the basic
> >>> principe
> >>> of using the halt and the dotest program needs to stay in place.
> >>
> >> I see no problem to execute "high" level tests using fpcunit. Maybe we
> >> need to
> >> redesign our tests structure a little bit because with the current
> >> test system
> >> we can't test fcl, packages and friends.
> > 
> > If we want to do this, there are 2 options:
> > 
> > 1. Include the test programs with the packages/fcl/rtl whatever.
> > 2. Use a completely separate test directory, as it is now.
> > 
> > Personally, I am slightly in favour of 2, because 1 will require
> > us to put the fpcunit in the RTL. 1. will require a more thorough
> > rewrite of the test suite...
> 
> Either:
> tests can be modelled after fpc/ i.e. containing also rtl/fcl/packages etc.
> tests go in each dir
> 
> With some more makefile magic testing can be limited either to rtl/compiler or
> extended to everything.

I should use option 2 - add a directory to tests for the fpcunit-tests.
Then, depending on some switch you can turn of the compilation of groups
of tests. Like only compile the RTL-tests, or compile RTL, FCL and DB-
tests.

That's easily done with the example i've send to the list.

Also, if people want to do that, they can use the Lazarus-fpcunit-
runner. They only need to include the right include-files.

But you can only do this for the high-level tests, offcourse. I woudn't
change the current tests...

> I'am quite sure that fpcunit based tests can be easily extended to return an
> error level <>0 in case of an error so they fit into the current testsuite. In
> the worst case we add some postprocessor program checking all xml output and
> writing the errors and exiting with 1. Maybe dotest could be even extended with
> little effort to parse the xml output of a test which is marked with e.g. %XML
> and write appropriate info to the logs.

The fpc-test runner is only 8 lines of code. 'If errorcount>0 then exit
(errorcount);' or something like that is very easily added. It's also
possible to change the output to a better readable log.

The advantage is that the user himself can choose if he wants XML,
Logfile or graphical output.

And adding the results to the testsuite-db can be done the same way as
it's done now.

Joost.




More information about the fpc-devel mailing list