From 516ae9bcf54382b69dfb889ae08a3dbed8db6e00 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 18 Nov 2024 17:03:21 +0100 Subject: [PATCH] FpDebug: change test case to console test-runner --- components/fpdebug/test/FpTest.lpi | 8 +++++++- components/fpdebug/test/FpTest.lpr | 19 ++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/components/fpdebug/test/FpTest.lpi b/components/fpdebug/test/FpTest.lpi index 75d84e85ae..aecec279ee 100644 --- a/components/fpdebug/test/FpTest.lpi +++ b/components/fpdebug/test/FpTest.lpi @@ -103,6 +103,9 @@ + + + @@ -114,7 +117,7 @@ - + @@ -124,6 +127,9 @@ + + + diff --git a/components/fpdebug/test/FpTest.lpr b/components/fpdebug/test/FpTest.lpr index 7e702265a2..94328478d2 100644 --- a/components/fpdebug/test/FpTest.lpr +++ b/components/fpdebug/test/FpTest.lpr @@ -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.