Skip to content

Commit e7061a0

Browse files
consolidate integration with cover
2 parents f131a83 + 4998f05 commit e7061a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1077
-58
lines changed
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
class if_icmp1
2+
{
3+
private static void f() {
4+
int i = 10;
5+
int j = 11;
6+
if (i == j) {
7+
assert false;
8+
}
9+
if (i >= j) {
10+
assert false;
11+
}
12+
if (j > i) {
13+
assert true;
14+
} else {
15+
assert false;
16+
}
17+
if (j <= i) {
18+
assert false;
19+
}
20+
if (j < i) {
21+
assert false;
22+
} else {
23+
assert true;
24+
}
25+
}
26+
27+
public static void main(String[] args)
28+
{
29+
f();
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
if_icmp1.class
3+
--cover location --no-trivial-tests
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 12 of 27 covered (44.4%)
7+
--
8+
^warning: ignoring
463 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
public class Person {
2+
3+
private int age;
4+
5+
//public method to get the age variable
6+
public int getAge(){
7+
return this.age;
8+
}
9+
10+
//public method to set the age variable
11+
public void setAge(int age){
12+
this.age = age;
13+
}
14+
15+
public static void main(String[] args) {
16+
Person p = new Person();
17+
p.setAge(10);
18+
int x = p.getAge();
19+
}
20+
}
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Person.class
3+
--cover location --no-trivial-tests
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 4 of 4 covered (100.0%)
7+
--
8+
^warning: ignoring
767 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
public class Person {
2+
3+
private int age;
4+
5+
//public method to get the age variable
6+
public int getAge(){
7+
return this.age;
8+
}
9+
10+
//public method to set the age variable
11+
public void setAge(int age){
12+
int smokedCigarettes = 3;
13+
this.age = age;
14+
15+
double averageCigarettesPerYear = smokedCigarettes * 1.0 / age;
16+
17+
if(averageCigarettesPerYear >= 7300.0) {
18+
assert false;
19+
}
20+
}
21+
22+
public static void main(String[] args) {
23+
Person p = new Person();
24+
p.setAge(10);
25+
int x = p.getAge();
26+
}
27+
}
28+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Person.class
3+
--cover location --no-trivial-tests
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 11 of 14 covered (78.6%)
7+
--
8+
^warning: ignoring
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
public class Person {
2+
3+
private int age;
4+
private String x;
5+
6+
//public method to get the age variable
7+
public int getAge(){
8+
return this.age;
9+
}
10+
11+
//public method to set the age variable
12+
public void setAge(int age){
13+
int smokedCigarettes = 3;
14+
this.age = age;
15+
16+
double averageCigarettesPerYear = smokedCigarettes * 1.0 / age;
17+
18+
if(averageCigarettesPerYear >= 7300.0) {
19+
assert false;
20+
}
21+
}
22+
23+
24+
public void setX(String newX) {
25+
if (newX == null) {
26+
x = "";
27+
} else {
28+
x = newX;
29+
}
30+
}
31+
32+
public String getX() {
33+
if (x == null) {
34+
return "";
35+
} else {
36+
return x;
37+
}
38+
}
39+
40+
public static void main(String[] args) {
41+
Person p = new Person();
42+
p.setAge(10);
43+
int x = p.getAge();
44+
String y = p.getX();
45+
}
46+
}
47+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Person.class
3+
--cover location --no-trivial-tests
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 14 of 22 covered (63.6%)
7+
--
8+
^warning: ignoring
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
public class Person {
2+
3+
private int age;
4+
private String x;
5+
private int value;
6+
7+
//public method to get the age variable
8+
public int getAge(){
9+
return this.age;
10+
}
11+
12+
//public method to set the age variable
13+
public void setAge(int age){
14+
int smokedCigarettes = 3;
15+
this.age = age;
16+
17+
double averageCigarettesPerYear = smokedCigarettes * 1.0 / age;
18+
19+
if(averageCigarettesPerYear >= 7300.0) {
20+
assert false;
21+
}
22+
}
23+
24+
public void setX(String newX) {
25+
if (newX == null) {
26+
x = "";
27+
} else {
28+
x = newX;
29+
}
30+
}
31+
32+
public String getX() {
33+
if (x == null) {
34+
return "";
35+
} else {
36+
return x;
37+
}
38+
}
39+
40+
public int getValue() {
41+
return value*2; // return twice the value
42+
}
43+
44+
public static void main(String[] args) {
45+
Person p = new Person();
46+
p.setAge(10);
47+
int x = p.getAge();
48+
String y = p.getX();
49+
int z = p.getValue();
50+
}
51+
}
52+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Person.class
3+
--cover location --no-trivial-tests
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 15 of 23 covered (65.2%)
7+
--
8+
^warning: ignoring
530 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
public class Account{
3+
4+
public static void main(String[] args){
5+
String name = "Neil Peart";
6+
int ID=2112;
7+
double salary = 1000000;
8+
9+
Employee employee = new Employee(name, ID, salary);
10+
11+
employee.setName(name);
12+
employee.setID(ID);
13+
employee.setSalary(salary);
14+
15+
employee.display();
16+
}
17+
}
18+
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
public class Employee {
2+
private String name;
3+
private int ID;
4+
private double salary;
5+
6+
public Employee( String name, int ID, double salary){
7+
setName(name);
8+
setID(ID);
9+
setSalary(salary);
10+
}
11+
12+
public void display(){
13+
System.out.printf("Employee %s, ID:%d earns %.2f per month", getName(),getID(),getSalary());
14+
}
15+
16+
public void setName( String name ){
17+
this.name = name;
18+
}
19+
20+
public void setID( int ID ){
21+
this.ID = ID;
22+
}
23+
24+
public void setSalary( double salary ){
25+
this.salary = salary;
26+
}
27+
28+
public String getName(){
29+
return name;
30+
}
31+
32+
public int getID(){
33+
return ID;
34+
}
35+
36+
public double getSalary(){
37+
return salary;
38+
}
39+
}
40+
41+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Account.class
3+
--cover location --no-trivial-tests
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 13 of 13 covered (100.0%)
7+
--
8+
^warning: ignoring
767 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
public class Person {
2+
3+
private int age;
4+
5+
//public method to get the age variable
6+
public int getAge(){
7+
return this.age;
8+
}
9+
10+
//public method to set the age variable
11+
public void setAge(int age){
12+
int smokedCigarettes = 3;
13+
this.age = age;
14+
15+
double averageCigarettesPerYear = smokedCigarettes * 1.0 / age;
16+
17+
if(averageCigarettesPerYear >= 7300.0) {
18+
assert false;
19+
}
20+
}
21+
22+
public static void main(String[] args) {
23+
Person p = new Person();
24+
p.setAge(10);
25+
int x = p.getAge();
26+
}
27+
}
28+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Person.class
3+
--cover location
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 13 of 16 covered (81.2%)
7+
--
8+
^warning: ignoring
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
public class Person {
2+
3+
private int age;
4+
private String x;
5+
private int value;
6+
7+
//public method to get the age variable
8+
public int getAge(){
9+
return this.age;
10+
}
11+
12+
//public method to set the age variable
13+
public void setAge(int age){
14+
int smokedCigarettes = 3;
15+
this.age = age;
16+
17+
double averageCigarettesPerYear = smokedCigarettes * 1.0 / age;
18+
19+
if(averageCigarettesPerYear >= 7300.0) {
20+
assert false;
21+
}
22+
}
23+
24+
public void setX(String newX) {
25+
if (newX == null) {
26+
x = "";
27+
} else {
28+
x = newX;
29+
}
30+
}
31+
32+
public String getX() {
33+
if (x == null) {
34+
return "";
35+
} else {
36+
return x;
37+
}
38+
}
39+
40+
public int getValue() {
41+
return value*2; // return twice the value
42+
}
43+
44+
public static void main(String[] args) {
45+
Person p = new Person();
46+
p.setAge(10);
47+
int x = p.getAge();
48+
String y = p.getX();
49+
int z = p.getValue();
50+
}
51+
}
52+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Person.class
3+
--cover location
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^\*\* 18 of 26 covered (69.2%)
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)