Graeme Geldenhuys wrote:
Hi,

Has anybody managed to get DUnit working under FPC/Lazarus? Text or GUI test runner, I don't mind. I got the Text Test Runner to compile with very little effort, but when I do a simple test case, it raises a AV. I haven't investigated any further yet.

I realize the original DUnit conversion was stopped due to FPC not supporting Interfaces and the release of fpcUnit. This has all changed now.

I initially started the port by replacing interfaces by abstract classes and ripping out unsupported stuff (or things I didn't know how to do) like using dll's for testregistries.

When fpcunit can along, I stopped and I am happy with fpcunit as it is. I have no intention to pick the conversion up again.


Yes, I know about fpcUnit. I have been converting my test suite consisting of 1600 tests to it, but things work quite different between the two xUnit test frameworks. DUnit is not based as much on JUnit as fpcUnit does. My thinking now (after a month), is that it might just be worth the effort to get DUnit working under FPC. The project I am converting still needs to compile under Delphi and DUnit after the conversion. I have already written a DUnit compatible interface for fpcUnit to help me along, but now I am hitting a snag with the TestDecorator and some Delta roundings in floating point tests.


Maybe you can write a mail to Dean Zobec, maybe he can help you with porting to fpcunit.

OTOH, if you are so dependent on DUnit, maybe you should invest some time to see where it fails. Possible areas: hardcoded layout of vmt, different memory layout of typeinfo information (I know some structures in Delphi should be accessed by p^^ (pointer to pointer to info), while in fpc they are p^ (pointer to info). But for accessing that info there are good functions that should hide the difference.

Vincent

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to