Skip to content

Commit

Permalink
# and ⎕SE are now accepted as targets
Browse files Browse the repository at this point in the history
  • Loading branch information
aplteam committed Mar 13, 2024
1 parent 611368d commit 97ef63d
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 21 deletions.
12 changes: 8 additions & 4 deletions APLSource/CodeCoverage.aplc
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@

rVersion
:Access Public Shared
r'CodeCoverage' '0.10.5+52' '2024-01-12'
r'CodeCoverage' '0.10.6+52' '2024-03-13'

History
:Access Public Shared
:Access Public Shared
* 0.10.6 from 2024-01-30
* Neither `#` nor `⎕SE` were allowed
* 0.10.5 from 2024-01-12
* Link to `Tester2` in the documentation corrected
* 0.10.4 from 2024-01-12
Expand Down Expand Up @@ -139,8 +141,10 @@
'Must be character vector'⎕SIGNAL 11/' '10v
('Has invalid characters',b/v)⎕SIGNAL 11//b~vAPL_Chars,',⎕#.'
v2','(),v
:If /~b0<⎕NCv2
11 ⎕SIGNAL'Unknown names: ',{,',',}/(~b)/v2
:If ~v2,¨'#' '⎕SE'
:If /~b0<⎕NCv2
11 ⎕SIGNAL'Unknown names: ',{,',',}/(~b)/v2
:EndIf
:EndIf
_watchv2
Expand Down
3 changes: 2 additions & 1 deletion APLSource/TestCases/Prepare.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
:EndIf
:If flag
3 ⎕MKDIR testPath
T.codeCoverage⎕NEW CodeCoverage(,'#.',{,'.',}2⎕THIS.##)
TODO⍝ T.codeCoverage←⎕NEW CodeCoverage(,⊂'#.',{⍵,'.',⍵}2↓⍕⎕THIS.##)
T.codeCoverage⎕NEW ##.CodeCoverage(,'#')
T.codeCoverage.filenametestFilename
:EndIf
4 changes: 2 additions & 2 deletions APLSource/TestCases/RunTests.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
Prepare
T.Run 1
:If 0<T.codeCoverage
{}CodeCoverage.ProcessData T.codeCoverage.filename
{}##.CodeCoverage.ProcessData T.codeCoverage.filename
option'Type of code coverage report' 0 1 CommTools.Select'Overview' 'Verbose' 'None'
:If 3>option
verbose2=option
htmlFilenameverbose CodeCoverage.CreateReport T.codeCoverage.filename
htmlFilenameverbose ##.CodeCoverage.CreateReport T.codeCoverage.filename
']Open file://',htmlFilename
:EndIf
:EndIf
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_001.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@

∆TidyUp:
⎕FUNTIE tno
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_002.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@

∆TidyUp:
⎕FUNTIE tno
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_003.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@

∆TidyUp:
⎕FUNTIE tno
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_004.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
RT._OK

∆TidyUp:
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_005.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
RT._OK

∆TidyUp:
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_006.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
RT._OK

∆TidyUp:
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_007.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
RT._OK

∆TidyUp:
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_008.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
RT._OK

∆TidyUp:
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
2 changes: 1 addition & 1 deletion APLSource/TestCases/Test_Misc_009.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@

∆TidyUp:
⎕FUNTIE tno
1 T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
1 Data.T.codeCoverage.DeleteFiles Data.T.codeCoverage.filename
Data.⎕EX'T'
Done
31 changes: 31 additions & 0 deletions APLSource/TestCases/Test_Misc_011.aplf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
RTest_Misc_011(stopFlag batchFlag);⎕TRAP;filename;C;a;b;c;d;html
Specify # as source
⎕TRAP(999 'C' '∘∘∘ ⍝ Deliberate error')(0 'N')

RT._Failed

filename(7390),'/CodeCoverage_Tests_',⎕SI

C⎕NEW ##.CodeCoverage(,,'#')
C.filenamefilename
C.Start

a1
b2
c3
da+b+c

C.Stop
{}C.Finalise
T.GoToTidyUp 3C.data

{}1 ##.CodeCoverage.ProcessDataAndCreateReport C.filename
html⎕NGET C.filename,'.html'
T.GoToTidyUp 0=+/'>→[3] 'html

RT._OK

∆TidyUp:
⎕ndelete C.filename,'.html'
Data.⎕EX'T'
Done
3 changes: 3 additions & 0 deletions APLSource/ToDo.apla
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(
''
)
Binary file modified TestResults/CodeCoverage.cr
Binary file not shown.
Binary file modified TestResults/CodeCoverage.profile
Binary file not shown.
2 changes: 1 addition & 1 deletion apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
source: "APLSource/CodeCoverage.aplc",
tags: "code-coverage,test-framework,unit-tests",
userCommandScript: "",
version: "0.10.5+65",
version: "0.10.6+67",
}
4 changes: 2 additions & 2 deletions packages_dev/apl-buildlist.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
packageID: [
"aplteam-Tester2-3.6.0",
"aplteam-Tester2-3.7.0",
"aplteam-CommTools-1.7.1",
"aplteam-CodeCoverage-0.10.3",
"aplteam-CodeCoverage-0.10.5",
"aplteam-APLTreeUtils2-1.3.1",
"aplteam-IniFiles-5.0.3",
],
Expand Down
4 changes: 2 additions & 2 deletions packages_dev/apl-dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aplteam-APLTreeUtils2-1.3.1
aplteam-Tester2-3.6.0
aplteam-Tester2-3.7.0
aplteam-CommTools-1.7.1
aplteam-CodeCoverage-0.10.3
aplteam-CodeCoverage-0.10.5

0 comments on commit 97ef63d

Please sign in to comment.