-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Requires now 18.0 and comes as a Tatin package
- Loading branch information
Showing
15 changed files
with
229 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.acre | ||
.acre/ | ||
aplcore | ||
Dist/ | ||
Development.dws | ||
change_history/ | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{r}←Initialize;⎕TRAP | ||
⎕TRAP←0 'S' | ||
r←⍬ | ||
{}⎕SE.UCMD'cd ',AcreConfig.ProjectFolder | ||
⎕SE.aplteam.InitializeAPLTreeProject ⎕THIS | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
Prepare | ||
⎕IO←1 ⋄ ⎕ML←1 | ||
T←⎕NEW ##.Tester2 ⎕THIS | ||
T.codeCoverage←⎕NEW ##.CodeCoverage(,⊂'#.',{⍵,'.',⍵}2↓⍕⎕THIS.##) | ||
T.codeCoverage.filename←(⊃1 ⎕NPARTS''),'TestResults/CodeCoverage' | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
RunTests;dcfFilename;htmlFilename;tno | ||
Prepare | ||
dcfFilename←(⊃,/¯1↓⎕NPARTS T.codeCoverage.filename),'.dcf' | ||
:If ##.FilesAndDirs.IsFile dcfFilename | ||
:AndIf ∆YesOrNo'CodeCovarge data file already exists; override?' | ||
tno←dcfFilename ⎕FTIE 0 | ||
dcfFilename ⎕FERASE tno | ||
:EndIf | ||
T.Run 1 | ||
htmlFilename←##.CodeCoverage.ProcessDataAndCreateReport T.codeCoverage.filename | ||
##.APLTreeUtils2.GoToWebPage'file://',htmlFilename | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
yesOrNo←{default}∆YesOrNo question;isOkay;answer;add;dtb;answer2 | ||
⍝ Ask a simple question and allows just "Yes" or "No" as answers. | ||
⍝ You may specify a default via the optional left argument which when specified | ||
⍝ rules what happens when the user just presses <enter>. | ||
⍝ `default` must be either 1 (yes) or 0 (no). | ||
⍝ Note that this function does not work as expected when traced! | ||
isOkay←0 | ||
default←{0<⎕NC ⍵:⍎⍵ ⋄ ''}'default' | ||
isOkay←0 | ||
:If ~0∊⍴default | ||
'Left argument must be a scalar'⎕SIGNAL 11/⍨1≠⍴,default | ||
:AndIf ~default∊0 1 | ||
'The left argument. if specified, must be a Boolean or empty'⎕SIGNAL 11 | ||
:EndIf | ||
:If 0=≢default | ||
add←' (y/n) ' | ||
:Else | ||
:If default | ||
add←' (Y/n) ' | ||
:Else | ||
add←' (y/N) ' | ||
:EndIf | ||
:EndIf | ||
:If 1<≡question | ||
((⍴question)⊃question)←((⍴question)⊃question),add | ||
question←⍪question | ||
:Else | ||
question←question,add | ||
:EndIf | ||
:Repeat | ||
⍞←question | ||
answer←⍞ | ||
:If answer≡question ⍝ Did... (since version 18.0 trailing blanks are not removed anynmore) | ||
:OrIf (≢answer)=¯1+≢question ⍝ ..the ... | ||
:OrIf 0=≢answer ⍝ ...user just... | ||
dtb←{⍵↓⍨-+/∧\' '=⌽⍵} | ||
answer2←dtb answer | ||
:OrIf answer2≡((-≢answer2)↑(⎕UCS 10){~⍺∊⍵:⍵ ⋄ ' ',dtb ⍺{⌽⍵↑⍨1+⍵⍳⍺}⌽⍵}question) ⍝ ...press <enter>? | ||
:If 0≠≢default | ||
yesOrNo←default | ||
isOkay←1 | ||
:EndIf | ||
:Else | ||
answer←¯1↑{⍵↓⍨-+/∧\' '=⌽⍵}answer | ||
:If answer∊'YyNn' | ||
isOkay←1 | ||
yesOrNo←answer∊'Yy' | ||
:EndIf | ||
:EndIf | ||
:Until isOkay | ||
⍝Done |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Coverage</title> | ||
<meta charset="utf-8"/> | ||
<style> | ||
@media screen{ | ||
html {background-color: #FFFFF0;} | ||
body { | ||
font-size: 16px; | ||
font-family : Verdana, "Bitstream Vera Sans", "DejaVu Sans", Tahoma, Geneva, Arial, Sans-serif; | ||
margin: 1em; | ||
} | ||
th, td {padding: 5px 10px;} | ||
th {text-align: left;} | ||
h1, h2, h3, h4, h5, h6 {color: #424242;} | ||
h1 {font-size: 22px;} | ||
h2 {font-size: 18px; margin-top: 2em; margin-bottom:0.3em;} | ||
tbody tr:nth-child(even) {background-color: #F0F0F0;} | ||
tbody tr:nth-child(odd) {background-color: #FAFAFA;} | ||
th {background-color: #E6E6E6;color: #424242;} | ||
table {border: silver 1px solid; font-size: 14px;font-family: APLFont, monospace;} | ||
code , code a {font-size: 14px; font-family: APLFont, monospace;} | ||
code.header { | ||
font-size: 16px; | ||
font-family: APLFont, monospace; | ||
margin: 1.5em 0.5em 0 0.5em; | ||
padding:0; | ||
display: block; | ||
} | ||
div.code-block { | ||
border: 1px silver dashed; | ||
background-color: #F2F2F2; | ||
display: block; | ||
margin: 0.5em 0.5em 0.5em 0.5em; | ||
padding: 0.5em; | ||
} | ||
div.code-block code {display: block; white-space: pre-wrap; margin:0; padding:0; word-wrap: break-word;} | ||
.emphasize { font-weight: 800;} | ||
ul li, ol li {margin: 0.7em 0.2em;} | ||
.float-right {float:right;} | ||
.no-underline { text-decoration :none;} | ||
.top-links {font-size:20px; padding-left: 0.6em;} | ||
.align-right {text-align: right;} | ||
#footer hr {margin-top:1.5em;} | ||
#footer p {margin-top:5px; padding-top:0; font-size: 9px;} | ||
@font-face { | ||
font-family: "APLFont"; | ||
src: | ||
local("APL385 Unicode"), | ||
url("https://misc.aplteam.com/apl385.ttf") format("truetype"); | ||
}} | ||
@media print{@page {size: portrait} | ||
@page { | ||
margin: 1cm 1cm 1cm 1.75cm; | ||
@bottom-right { | ||
content: counter(page) " / " counter(pages); | ||
} | ||
} | ||
body { | ||
font: 12pt "Times New Roman", Times, serif; | ||
line-height: 1.2; | ||
/* CSS3 filter, at the moment Webkit only. Prefix it for future implementations */ | ||
-webkit-filter: grayscale(100%); | ||
filter: grayscale(100%); /* future-proof */ | ||
} | ||
h1 {font-size: 18pt;} | ||
h2 {font-size: 16pt; margin-top: 10pt; margin-bottom: 3pt;} | ||
th, td {padding: 2pt 3pt;} | ||
th {text-align: left;background-color: #DBDBDB;} | ||
tbody tr:nth-child(odd) {background-color: #EDEDED;} | ||
table { | ||
color-adjust: exact !important; | ||
-webkit-print-color-adjust: exact !important; | ||
print-color-adjust: exact !important; | ||
font-size: 8pt; | ||
font-family: APLFont, monospace; | ||
} | ||
div.keep-together {break-inside: avoid; break-before:auto;} | ||
table {border: silver 1pt solid;} | ||
code , code a {font-size: 8pt; font-family: APLFont, monospace;} | ||
code.header { | ||
font-size: 8pt; | ||
font-family: APLFont, monospace; | ||
margin: 7pt 3pt 0 10pt; | ||
padding:0; | ||
display: block; | ||
} | ||
div.code-block { | ||
border: 1pt silver dashed; | ||
background-color: #F2F2F2; | ||
display: block; | ||
margin: 4pt 4pt 4pt 4pt; | ||
padding: 4pt; | ||
} | ||
div.code-block code {display: block; white-space: pre-wrap; margin:0; padding:0; word-wrap: break-word;} | ||
.emphasize { font-weight: 800;} | ||
a {text-decoration: none;color: black;} | ||
ul li, ol li {margin: 8pt 3pt;} | ||
.no-print {display:none;} | ||
.align-right {text-align: right;} | ||
#footer hr {margin-top:1.5em;} | ||
#footer p {margin-top:5pt; padding-top:0; font-size: 6pt;} | ||
@font-face { | ||
font-family: "APLFont"; | ||
src: | ||
local("APL385 Unicode"), | ||
url("https://misc.aplteam.com/apl385.ttf") format("truetype"); | ||
}} | ||
</style> | ||
</head> | ||
<body> | ||
<h1 id="top">Coverage Report</h1> | ||
<p>Watched: 5 fns/opr within <code>#.EventCodes.EventCodes</code></p> | ||
<p>Overall 91% of the testable code is covered.</p> | ||
<p>(Comment lines, empty lines, all <code>:End</code>* lines etc. are all ignored)</p> | ||
<p>3 of the fns/opr are 100% covered.</p> | ||
<div id="partly-covered" class="keep-together"> | ||
<p>2 are partly covered:</p> | ||
<table> | ||
<thead> | ||
<tr><th style="text-align:left;">Function/Operator</th><th style="text-align:left;">Lines not executed</th><th style="text-align:left;">Coverage</th><th style="text-align:right;">≢</th></tr> | ||
</thead> | ||
<tbody> | ||
<tr><td>#.EventCodes.EventCodes.List</td><td>16,18</td><td>83%</td><td class="align-right">12</td></tr> | ||
<tr><td>#.EventCodes.EventCodes.QEM</td><td>11</td><td>92%</td><td class="align-right">13</td></tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div id="footer"> | ||
<hr> | ||
<p>Created by "CodeCoverage" version 0.6.1.13 from 2020-09-16</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
"CaseCode": "Off", | ||
"Open": "", | ||
"ProjectSpace": "#.EventCodes", | ||
"StartUp": "" | ||
"StartUp": "Initialize" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters