Browse Source

can run tests on 1.7 vm

tags/V1_6_12
aclement 12 years ago
parent
commit
8823573934
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      testing/newsrc/org/aspectj/testing/AjcTest.java

+ 6
- 0
testing/newsrc/org/aspectj/testing/AjcTest.java View File

private static boolean is14VMOrGreater = true; private static boolean is14VMOrGreater = true;
private static boolean is15VMOrGreater = false; private static boolean is15VMOrGreater = false;
private static boolean is16VMOrGreater = false; private static boolean is16VMOrGreater = false;
private static boolean is17VMOrGreater = false;
static { // matching logic is also in org.aspectj.util.LangUtil static { // matching logic is also in org.aspectj.util.LangUtil
String vm = System.getProperty("java.version"); // JLS 20.18.7 String vm = System.getProperty("java.version"); // JLS 20.18.7
} else if (vm.startsWith("1.6")) { } else if (vm.startsWith("1.6")) {
is15VMOrGreater = true; is15VMOrGreater = true;
is16VMOrGreater = true; is16VMOrGreater = true;
} else if (vm.startsWith("1.7")) {
is15VMOrGreater = true;
is16VMOrGreater = true;
is17VMOrGreater=true;
} }
} }


if (vmLevel.equals("1.4")) canRun = is14VMOrGreater; if (vmLevel.equals("1.4")) canRun = is14VMOrGreater;
if (vmLevel.equals("1.5")) canRun = is15VMOrGreater; if (vmLevel.equals("1.5")) canRun = is15VMOrGreater;
if (vmLevel.equals("1.6")) canRun = is16VMOrGreater; if (vmLevel.equals("1.6")) canRun = is16VMOrGreater;
if (vmLevel.equals("1.7")) canRun = is17VMOrGreater;
if (!canRun) { if (!canRun) {
System.out.println("***SKIPPING TEST***" + getTitle()+ " needs " + getVmLevel() System.out.println("***SKIPPING TEST***" + getTitle()+ " needs " + getVmLevel()
+ ", currently running on " + System.getProperty("java.vm.version")); + ", currently running on " + System.getProperty("java.vm.version"));

Loading…
Cancel
Save