Skip to content

Commit f5f47a7

Browse files
Matthias Güdemannpeterschrammel
Matthias Güdemann
authored andcommitted
add regression test for coverage lines
1 parent 2ae1f47 commit f5f47a7

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
750 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
public class covered1
2+
{
3+
// this is a variable
4+
int x=1;
5+
//these are two, one line off the first
6+
int y=2;
7+
int z=3;
8+
//this is part of static init
9+
static int z0=0;
10+
11+
//another non-static
12+
int a;
13+
int b;
14+
static boolean odd;
15+
16+
static
17+
{
18+
odd=(z0+1)%2==0;
19+
}
20+
21+
covered1(int a, int b)
22+
{
23+
this.a=a*b;
24+
this.b=a+b;
25+
if(this.a==a)
26+
z0++;
27+
else
28+
odd=!odd;
29+
}
30+
// at the back
31+
int z1=2;
32+
int z2=3;
33+
int z3=4;
34+
//
35+
static int z4=5;
36+
int z5=5;
37+
}
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CORE
2+
covered1.class
3+
--cover location --json-ui --show-properties
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
.*\"coveredLines\": \"22\",$
7+
.*\"coveredLines\": \"4,6,7,23-25,31-33,36\",$
8+
.*\"coveredLines\": \"26\",$
9+
.*\"coveredLines\": \"28\",$
10+
.*\"coveredLines\": \"28\",$
11+
.*\"coveredLines\": \"28\",$
12+
.*\"coveredLines\": \"28\",$
13+
.*\"coveredLines\": \"29\",$
14+
.*\"coveredLines\": \"9,18\",$
15+
.*\"coveredLines\": \"18\",$
16+
.*\"coveredLines\": \"18\",$
17+
.*\"coveredLines\": \"18,35\",$
18+
--
19+
^warning: ignoring

0 commit comments

Comments
 (0)