From 80daf6ec2edeab0570514937810a4ee16ca22280 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 19 Jun 2017 16:55:44 +0200 Subject: [PATCH] runnables, run module tests, always display percentage --- src/ce_main.pas | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ce_main.pas b/src/ce_main.pas index 86d7dbca..413e1d41 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -2805,6 +2805,8 @@ var fname, covname: string; lst: TStringList; i: integer; +const + ic : array[boolean] of TCEAppMessageKind = (amkWarn, amkInf); begin asyncprocTerminate(sender); if fCovModUt and assigned(fRunProc) and (fRunProc.ExitStatus = 0) then @@ -2822,15 +2824,14 @@ begin lst.LoadFromFile(covname); for i := 0 to lst.Count-1 do if lst[i][1..7] = '0000000' then - begin - fMsgs.message(format('%s(%d): %s', [fDoc.fileName, i+1, - 'not covered by the unittests']), fDoc, amcEdit, amkWarn); - fullcov := false; - end; + begin + fMsgs.message(format('%s(%d): %s', [fDoc.fileName, i+1, + 'not covered by the unittests']), fDoc, amcEdit, amkWarn); + fullcov := false; + end; sysutils.DeleteFile(covname); sysutils.DeleteFile('__main.lst'); - if fullcov then fMsgs.message(shortenPath(fDoc.fileName, 25) - + ' is 100% covered by the unittests', fDoc, amcEdit, amkInf); + fMsgs.message(lst[lst.Count-1], fDoc, amcEdit, ic[fullcov]); finally lst.free; end;