Skip to content

Commit ec2fe72

Browse files
committed
RunTests and Make polished
1 parent bd3d018 commit ec2fe72

34 files changed

+6366
-64
lines changed

APLSource/EventCodes.aplc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
∇ r←Version
6464
:Access Public Shared
65-
r←({⍵}⍕⎕THIS)'3.0.0.16' '2020-09-21'
65+
r←({⍵}⍕⎕THIS)'3.0.0.21' '2020-09-21'
6666
6767

6868
∇ History

APLSource/Initialize.aplf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
{r}←Initialize;⎕TRAP
1+
{r}←Initialize;⎕TRAP;parent
22
⎕TRAP←0 'S'
33
r←⍬
44
{}⎕SE.UCMD'cd ',AcreConfig.ProjectFolder
5-
⎕SE.aplteam.InitializeAPLTreeProject ⎕THIS
5+
⎕WSID←AcreConfig.ProjectFolder,'project.dws'
6+
parent←⍕⎕THIS
7+
⍝ {}⎕SE.Tatin.LoadDependencies'./packages/'parent ⍝ There are not any!
8+
parent,←'.TestCases'
9+
{}⎕SE.Tatin.LoadDependencies'./packages_dev/'parent
610
⍝Done
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
list←GetInstalledAPLs dummy
22
⍝ Examines the Registry in order to find out which versions of Dyalog are installed and return all of them
33
list←''
4-
:If 0≠≢list←##.WinReg.GetAllSubKeyNames'Software\Dyalog'
4+
:If 0≠≢list←WinReg.GetAllSubKeyNames'Software\Dyalog'
55
:AndIf 0≠≢list←('Dyalog APL/W'{⍺∘≡¨(≢⍺)↑¨⍵}list)/list
6-
list←(50<≢¨##.WinReg.GetAllValueNames¨(⊂'Software\Dyalog\'),¨list)/list
6+
list←(50<≢¨WinReg.GetAllValueNames¨(⊂'Software\Dyalog\'),¨list)/list
77
:EndIf

APLSource/TestCases/Prepare.aplf

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
Prepare
1+
Prepare;testPath;testFilename;ask;answer
22
⎕IO←1 ⋄ ⎕ML←1
3-
T←⎕NEW ##.Tester2 ⎕THIS
4-
T.codeCoverage←⎕NEW ##.CodeCoverage(,⊂'#.',{⍵,'.',⍵}2↓⍕⎕THIS.##)
5-
T.codeCoverage.filename←(⊃1 ⎕NPARTS''),'TestResults/CodeCoverage'
3+
T←⎕NEW Tester2 ⎕THIS
4+
T.custom_1←'Not ready yet'
5+
testPath←(⊃1 ⎕NPARTS''),'TestResults'
6+
testFilename←testPath,'/CodeCoverage'
7+
:If ⎕NEXISTS testPath
8+
:If ⎕NEXISTS testFilename,'.dcf'
9+
ask←{⎕←⍵,'; 1=append, 2=replace' ⋄ a←⎕ ⋄ ~(⊂a)∊1 2:∇ ⍵ ⋄ ⊃a}
10+
answer←⊃ask'Coverage file already exists'
11+
:If 2≡answer
12+
1 ⎕NDELETE testFilename,'.dcf'
13+
:EndIf
14+
:EndIf
15+
:EndIf
16+
3 ⎕MKDIR testPath ⍝
17+
T.codeCoverage←⎕NEW CodeCoverage(,⊂'#.',{⍵,'.',⍵}2↓⍕⎕THIS.##)
18+
T.codeCoverage.filename←testFilename
619
⍝Done

APLSource/TestCases/RunTests.aplf

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
RunTests;dcfFilename;htmlFilename;tno
1+
RunTests;htmlFilename
22
Prepare
3-
dcfFilename←(⊃,/¯1↓⎕NPARTS T.codeCoverage.filename),'.dcf'
4-
:If ##.FilesAndDirs.IsFile dcfFilename
5-
:AndIf ∆YesOrNo'CodeCovarge data file already exists; override?'
6-
tno←dcfFilename ⎕FTIE 0
7-
dcfFilename ⎕FERASE tno
8-
:EndIf
93
T.Run 1
10-
htmlFilename←##.CodeCoverage.ProcessDataAndCreateReport T.codeCoverage.filename
11-
##.APLTreeUtils2.GoToWebPage'file://',htmlFilename
4+
htmlFilename←CodeCoverage.ProcessDataAndCreateReport T.codeCoverage.filename
5+
:If 1 ∆YesOrNo'View CodeCoverage report?'
6+
APLTreeUtils2.GoToWebPage'file://',htmlFilename
7+
:EndIf
128
⍝Done

APLSource/TestCases/Test_30.aplf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
list←⌽GetInstalledAPLs ⍬
77
:Repeat
8-
version←3⊃' '##.APLTreeUtils2.Split⊃list
8+
version←3⊃' 'APLTreeUtils2.Split⊃list
99
:If 0=≢errors←∆GetErrorsFromHelpPage'http://help.dyalog.com/',version,'/Content/Language/System%20Functions/trap.htm'
1010
list←1↓list
1111
:EndIf

APLSource/TestCases/Test_ZZZ_998.aplf renamed to APLSource/TestCases/Test_998.aplf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
R←Test_ZZZ_998(stopFlag batchFlag);⎕IO;⎕ML;⎕TRAP;report;buff;xml;source
1+
R←Test_998(stopFlag batchFlag);⎕IO;⎕ML;⎕TRAP;report;buff;rf
22
⍝ Checks on two text vectors: "⍝TODO⍝" and "⍝CHECK⍝"; never fails, just reports.
3+
⎕IO←0 ⋄ ⎕ML←3
34
⎕TRAP←(999 'C' '. ⍝ Deliberate error')(0 'N')
45
R←T._OK
56
report←''
7+
rf←APLTreeUtils2
68

7-
xml←⎕XML⊃⎕NGET'publish.config'
8-
source←3⊃xml[xml[;2]⍳⊂'container';]
9-
buff←T.FindSpecialString'⍝CHECK⍝'
10-
buff←(buff[;1]≢¨⎕XSI[1])⌿buff ⍝ remove caller
9+
buff←rf T.FindSpecialString'⍝CHECK⍝'
10+
buff←(buff[;0]≢¨⎕XSI[0])⌿buff ⍝ remove caller
1111
:If 0≠≢buff
1212
report,←↓(⊂' ⍝CHECK⍝ found:'),(⊂' '),¨buff
1313
:EndIf
14-
buff←T.FindSpecialString'⍝TODO⍝'
15-
buff←(buff[;1]≢¨⎕XSI[1])⌿buff ⍝ remove caller
14+
buff←rf T.FindSpecialString'⍝TODO⍝'
15+
buff←(buff[;0]≢¨⎕XSI[0])⌿buff ⍝ remove caller
1616
:If 0≠≢buff
1717
report,←↓(⊂' ⍝TODO⍝ found:'),(⊂' '),¨buff
1818
:EndIf

APLSource/TestCases/Test_ZZZ_999.aplf

Lines changed: 0 additions & 33 deletions
This file was deleted.

Make/Make.DWS

1.92 MB
Binary file not shown.

TestResults/CodeCoverage.dcf

504 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)