Skip to content

Output formatter

.cov.format.display

Show the coverage results visually. This writes to -1 instead of returning strings, to avoid being limited by the console size

Parameter:

Name Type Description
results table A coverage results table

Returns:

Name Type Description
Null

Example: Format the coverage result, printing to STDOUT

 q) myFunc: {
     {{x*y}/[x]}
     };
 q) .cov.format.display .cov.run[myFunc; enlist 1 2 3; (enlist `functions)!(enlist `myFunc)]
 18% coverage
 1/1 functions have incomplete coverage

 myFunc 18%

   {
 X     {<<<{x*y}/[x]>>>}
       }
 ::

.cov.format.go

Format the coverage results visually

Parameters:

Name Type Description
results table A coverage results table

Returns:

Name Type Description
String[]

Example: Format the coverage result, returning the result as strings

 q) myFunc: {
     {{x*y}/[x]}
     };
 q) .cov.format.go .cov.run[myFunc; enlist 1 2 3; (enlist `functions)!(enlist `myFunc)]
 "18% coverage"
 "1/1 functions have incomplete coverage"
 ""
 "myFunc 18%"
 ""
 "  {"
 "X     {<<<{x*y}/[x]>>>}"
 "      }"