DUnit Folder Iterator Extension

In 2012 Uwe Raabe blogged about an extension to the DUnit framework he had written. He mentioned it today in the German Delphi Praxis forum.

Guess what? It’s brilliant. It does exactly what I always wanted to write (and never came around doing) for the Unit Tests of the GExperts Code Formatter.

Those tests basically consist of a set of input files in one directory and for each of the tested configurations another set of files with the expected output. It always irked me that I actually had to write some code every time I added a new test instead of simply adding another bunch of files.

Today I changed those tests to use Uwe’s unit (with a few modifications to make it compatible to Delphi 2007). And I found that there were quite a few files which didn’t even get tested at all, because I forgot to add the code.

I’m happy to report that even with these additional tests, the number of failed tests did not increase.