Joseph Snyder 9ad07fbeb8 CTest: Fix MUMPS coverage parsing and test
Fix the MUMPS coverage parser:

* Account for tabs after entry points

* Stop double incrementing lines that have explicit calls to the 0 line

* If a line has been previously marked as non executable, but then
  contains a count, increment it an extra one to push it back into
  the executable code set.

Add a custom routine and corresponding coverage files in the test case.
This file is smaller and has cmcov/mcov files that have data for only
that routine.
2014-05-16 10:16:40 -04:00

37 lines
876 B
Mathematica

ZZCOVTST;OSEHRA/JPS -- Test routine for Coverage Parsing;4/28/2014
; (tab) This is series of comments
; (tab) it should all be not executable
; (spaces) one of these sets might be a problem
; (spaces) we will have to see.
EN ; This entry point shouldn't be found without fixing
N D
S D=1 ;An executable line
D T1^ZZCOVTST
I '$$T5 W "RETURNED FROM t5",!
Q
; This line not executable
;
T1 ; This line should always be found
N D
S D=2
W !,D,!,"This is the second entry point",!
D T2^ZZCOVTST(D)
Q
;
T2(EQ) ; This is debatable and only called with ENT^ROU notation
N D
S D=3
W !,D,!,EQ,"This is the third entry point",!
D T3^ZZCOVTST
Q
;
T3 N D S D=4 W D,!,"Fourth Entry point",! Q
;
T4 N D S D=5 W "Shouldn't be executed"
W "Lots to not do"
Q
T5(EQ) ;this entry point is called with a $$ notation
W "THIS IS THE $$ NOTATION!",!
Q 0
;