As Delphi supports attributes now, it would be easy to modify DUnit, so a test procedure is designates as test by applying the [test] attribute (mirroring NUnit). While trying to implement the change I realised that further modifications are needed - you can only find pointer to a procedure if it's published, so the procedure needs to be executed using TRttiMethod.Invoke. I have a prototype working, but I can't help noticing that the code is becoming increasingly cluttered and suboptimal. For example, TMethodEnumerator could be eliminated.
Currently DUnit design reflects limitation of earlier versions of Delphi. As these limitation have been overcome in Delphi 2010, I think the best course of action would branching DUnit to create DUnit for Delphi 2010 and above. It would allow to rationalise the code and open the way to further improvements.
What do you reckon?