From: Kristofer G. S. [home] <kri...@xs...> - 2004-10-24 09:55:46
|
Martin Larsson wrote: > Yes. I have my own GUI and my own TTestCase. I've added some > functionality for logging (which then shows up in the GUI) This logging thing is something I've been working on too. Unfortunately what we now have in this respect is just a "quick hack" based on DUnit 4.x, which was created for a specific project some 3 years ago, and has gone on (through - arrrrghh, dare I say it - *replication*) to live an uncontrolled life of its own in the deep dungeons of our hardware development labs... <shudder>. Since then, I've been desperately trying to find the time to develop an extension to DUnit, properly controlled in our generic code library, which includes add-on functions, logging, breakpoints with operator input, etc. ... Juanco wrote: > Sorry about that. What happened is that we didn't address any of the > outstanding issues in DUnit. We worked only on .Net and Delphi 2005 > compatibility. I completely understand. > Hopefully, there will soon be an installer or other tool that can > automatically upgrade the version of DUnit embedded in Delphi > 2005. That'd be awesome. On a related note, I'm still trying to figure out how to safely conditionally-compile my test projects for different versions of DUnit. For example, version 7.2.0 has the new functions Check(Not)EqualsHex/Bin and v9.0.5 has CheckTrue/False, both are real assets IMO. In DUnitAbout.pas there's a {$include versioninfo.inc} but I have 2 problems with this: (1) versioninfo.inc is a rather generic name. I fear for the day when I stumble across some other library with an identically named .inc-file. Could we change it to DUnitVersionInfo.inc? (2) I was trying to do this: {$IF ReleaseNo[1]<9 } <specific code pertaining only to DUnit 7.2 and lower> {$IFEND} where ReleaseNo is defined in versioninfo.inc as (const): ReleaseNo : array[1..3] of Integer = (9,0,5); but D6 didn't like this construct, saying of "ReleaseNo[1]" that it is not a proper constant. I *can* compare on the string ReleaseStr, i.e. {$IF ReleaseStr<'9.0.5' } - but this will break once we go to version 10... So could be break out ReleaseNo[] array in three plain integer consts instead, e.g.: const DUNIT_MAJOR_VERSION = 9; DUNIT_MINOR_VERSION = 0; DUNIT_RELEASE_VERSION = 5; and then, for backward compatability: ReleaseNo: array[1..3] of Integer = (DUNIT_MAJOR_VERSION, DUNIT_MINOR_VERSION,DUNIT_RELEASE_VERSION); ? > BTW, I completely agree that the best solution for you right now is to > create a TKristoferTestCase class. Already working on it... <g> Kristofer |