I have a DUnit project that will not compile as a Console if I add some units.
A project (dpr) is created by the wizard and defined CONSOLE_TESTRUNNER.
{$IFDEF CONSOLE_TESTRUNNER}
{$APPTYPE CONSOLE}
{$ENDIF}
begin
Application.Initialize;
if IsConsole then // <-- IsConsole is set to False.
with TextTestRunner.RunRegisteredTests do
Free
else
GUITestRunner.RunRegisteredTests;
end.
Units that make this fail include some components of the VCL, but they do not run tests.
I even tried installing the Linker Option, but that didn't matter.
Has anyone encountered a similar problem?
Just to clarify: this is a Win32 project in Delphi 2010.
source
share