From 558b36aa826a6d0cca0c6c3120228aeb68fe6920 Mon Sep 17 00:00:00 2001 From: vincents Date: Thu, 7 Sep 2006 13:15:51 +0000 Subject: [PATCH] fpcunit: use xmlreporter in console runner git-svn-id: trunk@9829 - --- components/fpcunit/ide/fpcunitide.lpk | 13 ++++++++++--- components/fpcunit/ide/fpcunitproject1.inc | 9 +++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/components/fpcunit/ide/fpcunitide.lpk b/components/fpcunit/ide/fpcunitide.lpk index 81a1ed5898..1b351e4381 100644 --- a/components/fpcunit/ide/fpcunitide.lpk +++ b/components/fpcunit/ide/fpcunitide.lpk @@ -1,12 +1,14 @@ + + - + @@ -17,12 +19,16 @@ - + + + + + @@ -34,10 +40,11 @@ - + + diff --git a/components/fpcunit/ide/fpcunitproject1.inc b/components/fpcunit/ide/fpcunitproject1.inc index f42458813c..5b63784f3c 100644 --- a/components/fpcunit/ide/fpcunitproject1.inc +++ b/components/fpcunit/ide/fpcunitproject1.inc @@ -4,7 +4,8 @@ NewSource := + '{$mode objfpc}{$H+}' + #13 + #13 + 'uses' + #13 - + ' custapp, Classes, SysUtils, fpcunit, testreport, testregistry;' + #13 + + ' custapp, Classes, SysUtils, fpcunit, testregistry,'#13 + + ' dom, testreport, xmlreporter, xmlwrite;'#13 + #13 + 'const' + #13 + ' ShortOpts = ''alh'';' + #13 @@ -29,16 +30,16 @@ NewSource := + ' var' + #13 + ' testResult: TTestResult;' + #13 + #13 - + ' procedure doXMLTestRun(aText: TTest);' + #13 + + ' procedure doXMLTestRun(aTest: TTest);' + #13 + ' var' + #13 + ' XMLResultsWriter: TXMLResultsWriter;' + #13 + ' begin' + #13 + ' try' + #13 + ' XMLResultsWriter := TXMLResultsWriter.Create;' + #13 + ' testResult.AddListener(XMLResultsWriter);' + #13 - + ' XMLResultsWriter.WriteHeader;' + #13 + ' aTest.Run(testResult);' + #13 + ' XMLResultsWriter.WriteResult(testResult);' + #13 + + ' WriteXMLFile(XMLResultsWriter.Document, output);'#13 + ' finally' + #13 + ' XMLResultsWriter.Free;' + #13 + ' testResult.Free;' + #13 @@ -46,7 +47,7 @@ NewSource := + ' end;' + #13 + #13 + ' {$IFNDEF VER2_0}' + #13 - + ' procedure doPlainTestRun(aText: TTest);' + #13 + + ' procedure doPlainTestRun(aTest: TTest);' + #13 + ' var' + #13 + ' PlainResultsWriter: TPlainResultsWriter;' + #13 + ' begin' + #13