[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 00:17:00 CEST 2006


On Mon, 2006-05-22 at 23:06 +0200, Graeme Geldenhuys wrote:
> On 5/22/06, Vincent Snijders <vsnijders at quicknet.nl> wrote:
> >  From Greame I would like to know how he proposes to update the
> > TestSuite, if a new tests it added.
> 
> I am busy looking at the /tests directory now, to understand how tests
> get grouped. This should give me a clearer idea of what is possible.
> It took us a while to get a decent test structure for our code as
> well.
> 
> I agree that certain tests will have to stay in the format they are in
> now.  Things that shouldn't compile, etc... All other tests could be
> group in test suites. RTL suite, FCL suite, etc..
> Maybe Dean Zobec has some ideas on this too.  Dean?
> 
> I like the idea you guys have of using the Bug Report Number as the
> test name.  This could be done with fpcUnit as well and should make
> tracking of what tests have been converted to fpcUnit quite easy.
> eg: Lets say we have a bug #1234 in the RTL.  Edit the RTL suite, by
> adding a new method to the test class and the same naming convention
> could be used. No extra objects / classes need to be created, just a
> new method needs to be added.  Even the person reporting the bug could
> write a simple fpcUnit test and submit that to Mantis, which can then
> be copied into the correct suite. I submitted a couple of simple
> fpcUnit test cases to show a bug, until I found out the FPCCore team
> doesn't use the fpcUnit testing framework.  At that stage, I thought
> using fpcUnit was the logical choice as it shipped with FPC.

Attached you can find an example for how this could be implemented.

The fpcunittests program runs all tests. It get those tests from the
testunits.inc file. Use the gentestunits.sh script to generate that
include file and fill it with all files names test*.pp. (bash/unix only.
Maybe put this in a sort of makefile-system, if that's possible?)

So to add a new unit with tests, name it test*.pp and place it in the
same dir as the rest and run the script.

The output is XML, but we could easily add a resultswriter which
generates plain text like a logfile.

A unit with 'bug2345' test could be added easily.

I've made a dateutils-test for my last changes. One test still fails, I
have a patch ready for that, will send that tomorrow.

What do you guys think?

Regards,
  
  Joost.

ps: No, Bram's patch for EncodeDate didn't get applied
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpcunittests.tgz
Type: application/x-compressed-tar
Size: 1373 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20060523/1ba53196/attachment.bin>


More information about the fpc-devel mailing list