Improve test coverage.

This commit is contained in:
gmp
2020-07-09 17:07:34 -04:00
parent b74a17279b
commit 2cf43e041c
7 changed files with 600 additions and 131 deletions
BIN
View File
Binary file not shown.
+79 -9
View File
@@ -1,24 +1,86 @@
package test;
public class AClass {
public static int staticintval = 100;
import java.lang.Class;
import java.lang.ClassLoader;
import java.lang.Exception;
import java.lang.Object;
import java.lang.String;
public int intval = 0;
public class AClass {
public static Object staticobj = new Object();
public static boolean staticbl = true;
public static byte staticbt = 'a';
public static char staticch = 'b';
public static short staticsh = 10;
public static int staticint = 100;
public static long staticlo = 1000;
public static float staticfl = (float)1.1;
public static double staticdb = 1000.0001;
private static Object pstaticobj = new Object();
private static boolean pstaticbl = true;
private static byte pstaticbt = 'a';
private static char pstaticch = 'b';
private static short pstaticsh = 10;
private static int pstaticint = 100;
private static long pstaticlo = 1000;
private static float pstaticfl = (float)1.1;
private static double pstaticdb = 1000.0001;
public Object obj = new Object();
public boolean bl = false;
public byte bt = 'c';
public char ch = 'd';
public short sh = 11;
public int in = 101;
public long lo = 1001;
public float fl = (float)2.2;
public double db = 1001.1001;
private Object pobj = new Object();
private boolean pbl = false;
private byte pbt = 'c';
private char pch = 'd';
private short psh = 11;
private int pin = 101;
private long plo = 1001;
private float pfl = (float)2.2;
private double pdb = 1001.1001;
public static Boolean GetStaticBoolean() {
return staticbl;
}
public static byte GetStaticByte() {
return staticbt;
}
public static char GetStaticChar() {
return staticch;
}
public static short GetStaticShort() {
return staticsh;
}
public static int GetStaticInt() {
return staticintval;
return staticint;
}
public static void SetStaticInt(int val) {
staticintval = val;
staticint = val;
}
public static Object GetStaticObject() {
return staticobj;
}
public void IncInt() {
intval = intval + 1;
in = in + 1;
}
public int GetInt() {
return intval;
return in;
}
public boolean GetBoolean() {
@@ -50,10 +112,18 @@ public class AClass {
}
public void SetInt(int val) {
intval = val;
in = val;
}
public void AddInts(int val1, int val2) {
intval = val1 + val2;
in = val1 + val2;
}
public Class loadClass(String s) throws Exception {
throw new Exception("AClass: loadClass exception");
}
public ClassLoader getClassLoader() {
return this.getClass().getClassLoader();
}
}
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
package test;
import java.lang.ClassLoader;
import java.lang.Exception;
public class AClass2 {
public ClassLoader getClassLoader() throws Exception {
throw new Exception("Exception");
}
}