t/test17-goto.p

filter: Statementstmt 90.0% 9 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 93.3% 14 / 15 CC 1 SCAR 0.0
CC
1
Cov
90%
other
1.0
origin
1.0
destination
1.0
CRAP 1.0
« t/test60-subname.p ↑ Summary t/test13.p »
1 # test various forms of goto
2  
3 # simple in-line goto
4  
5 16 goto main_label;
6 0 die "should not get here";
7 16 main_label:;
8  
9 16 ▶sub other { } # stub for checking sub caller info
Subroutine other: called CC=1 SCAR=0.0
10  
11 # goto &sub
12  
13 16 ▶sub origin {
Subroutine origin: called CC=1 SCAR=0.0
14 16 other();
15 16 goto &destination;
16 }
17  
18 16 ▶sub destination {
Subroutine destination: called CC=1 SCAR=0.0
19 16 other();
20 }
21  
22 16 origin();
23  
24 # goto out of a sub
25  
26 16 ▶sub bar {
Subroutine bar: called CC=1 SCAR=0.0
27 16 goto foo_label;
28 }
29  
30 16 ▶sub foo {
Subroutine foo: called CC=1 SCAR=0.0
31 16 bar();
32 foo_label:;
33 }
34  
35 16 foo();
« t/test60-subname.p ↑ Summary t/test13.p »