Skip to content

Commit fda7952

Browse files
committed
Bug fix related to ignore
1 parent 9fe9bd0 commit fda7952

File tree

8 files changed

+1145
-8
lines changed

8 files changed

+1145
-8
lines changed

APLSource/CodeCoverage.aplc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@
5454

5555
∇ r←Version
5656
:Access Public Shared
57-
r←'CodeCoverage' '0.10.2+52' '2023-04-09'
57+
r←'CodeCoverage' '0.10.3+52' '2023-06-23'
5858
5959

6060
∇ History
6161
:Access Public Shared
62+
⍝ * 0.10.3 from 2023-04-23
63+
⍝ * Bug fix: Instance names could not be assigned to "ignore"
6264
⍝ * 0.10.2 from 2023-04-09
6365
⍝ * On non-Windows platforms the file access matrix needs setting to avoid problems
6466
⍝ * 0.10.1 from 2023-04-08
@@ -137,18 +139,14 @@
137139
∇ r←Get
138140
r←','(≠⊆⊢),_ignore
139141
140-
∇ set value;v;b;v2;noOf
142+
∇ set value;v;noOf
141143
:If 0=noOf←+/∧\1=≡¨value.NewValue
142144
v←∊value.NewValue
143145
:Else
144146
v←(⊃{⍺,',',⍵}/noOf↑value.NewValue),noOf↓value.NewValue
145147
:EndIf
146148
'Must be character vector'⎕SIGNAL 11/⍨' '≠1↑0⍴v
147149
('Has invalid characters',b/v)⎕SIGNAL 11/⍨∨/b←~v∊APL_Chars,',⎕#.'
148-
v2←','(≠⊆⊢),v
149-
:If ∨/~b←0<⎕NC⊃v2
150-
11 ⎕SIGNAL⍨'Unknown names: ',⊃{⍺,',',⍵}/(~b)/v2
151-
:EndIf
152150
_ignore←v
153151
154152
:EndProperty
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
R←Test_002(stopFlag batchFlag);⎕TRAP
1+
R←Test_002(stopFlag batchFlag);⎕TRAP;ref
22
⍝ Pro-forma test case: runs functions in scripts
33
⎕TRAP←(999 'C' '∘∘∘ ⍝ Deliberate error')(0 'N')
44
R←T._Failed
@@ -7,6 +7,9 @@
77
∆Script2.Run
88
∆Script3.Run
99
∆Script4.Run
10+
ref←⎕NEW ∆Script5
11+
{}ref.Hello1
12+
{}ref.Hello2
1013

1114
R←T._OK
1215
⍝Done
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
:Class ∆Script5
2+
⍝ Useful to check on instance methods
3+
∇ make
4+
:Access Public Instance
5+
:Implements Constructor
6+
⎕RL←+/⎕ts
7+
8+
∇ r←Hello1
9+
:Access Public Instance
10+
r←'Galaxy'
11+
12+
∇ r←Hello2
13+
:Access Public Instance
14+
r←'World'
15+
16+
:EndClass
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
R←Test_Misc_061(stopFlag batchFlag);⎕TRAP;htmlFilename;row;name;could;did;html
2+
⍝ Calls ProcessData and CreateReport rather than ProcessDataAndCreateReport
3+
⎕TRAP←(999 'C' '∘∘∘ ⍝ Deliberate error')(0 'N')
4+
R←T._Failed
5+
6+
Data.Prepare
7+
Data.T.codeCoverage.filename←(739⌶0),'/CodeCoverage_',(⊃⎕SI)
8+
Data.T.codeCoverage.ignore←'#.CodeCoverage.TestCases.Data.∆Script5.Hello2'
9+
{}Data.T.RunThese'Test_002'
10+
##.CodeCoverage.ProcessData Data.T.codeCoverage.filename
11+
htmlFilename←##.CodeCoverage.CreateReport Data.T.codeCoverage.filename
12+
html←⊃⎕NGET htmlFilename
13+
→T.GoToTidyUp 1≠+/'∆Script5.Hello1'⍷html
14+
→T.GoToTidyUp 0≠+/'∆Script5.Hello2'⍷html
15+
16+
R←T._OK
17+
18+
∆TidyUp:
19+
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
20+
Data.⎕EX'T'
21+
⍝Done

TestResults/CodeCoverage.cr

-40 Bytes
Binary file not shown.

TestResults/CodeCoverage.html

Lines changed: 1099 additions & 0 deletions
Large diffs are not rendered by default.

TestResults/CodeCoverage.profile

-11.3 KB
Binary file not shown.

apl-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
source: "APLSource/CodeCoverage.aplc",
2020
tags: "code-coverage,test-framework,unit-tests",
2121
userCommandScript: "",
22-
version: "0.10.2+62",
22+
version: "0.10.3+63",
2323
}

0 commit comments

Comments
 (0)