FpDebug: change test case to console test-runner

This commit is contained in:
Martin 2024-11-18 17:03:21 +01:00
parent ad73bdff39
commit 516ae9bcf5
2 changed files with 25 additions and 2 deletions

View File

@ -103,6 +103,9 @@
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="fptest"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
@ -114,7 +117,7 @@
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Exceptions Count="4">
<Item1>
<Name Value="EAbort"/>
</Item1>
@ -124,6 +127,9 @@
<Item3>
<Name Value="EFOpenError"/>
</Item3>
<Item4>
<Name Value="EConvertError"/>
</Item4>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -1,17 +1,34 @@
program FpTest;
{$mode objfpc}{$H+}
{off $DEFINE TESTGUI}
uses
Interfaces, Forms, GuiTestRunner, TestHelperClasses,
Interfaces, Forms,
{$ifdef TESTGUI} GuiTestRunner, {$ELSE} consoletestrunner, {$ENDIF}
TestHelperClasses,
TestDwarfVarious, TestMemManager, TestPascalParser,
TestErrorHandler, TestLineMap;
{$R *.res}
{$ifNdef TESTGUI}
var
Application: TTestRunner;
{$ENDIF}
begin
{$ifdef TESTGUI}
Application.Initialize;
Application.CreateForm(TGuiTestRunner, TestRunner);
Application.Run;
{$ELSE}
DefaultRunAllTests:=True;
DefaultFormat:=fXML;
Application := TTestRunner.Create(nil);
Application.Initialize;
Application.Run;
Application.Free;
{$ENDIF}
end.