<action issue="LANG-989" type="add" dev="ggregory">Add org.apache.commons.lang3.SystemUtils.IS_JAVA_1_8</action>

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1579865 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2014-03-21 02:02:04 +00:00
parent 024a22b015
commit 863bf52eae
1 changed files with 18 additions and 0 deletions

View File

@ -148,6 +148,24 @@ public class SystemUtilsTest {
assertFalse(SystemUtils.IS_JAVA_1_5);
assertTrue(SystemUtils.IS_JAVA_1_6);
assertFalse(SystemUtils.IS_JAVA_1_7);
} else if (javaVersion.startsWith("1.7")) {
assertFalse(SystemUtils.IS_JAVA_1_1);
assertFalse(SystemUtils.IS_JAVA_1_2);
assertFalse(SystemUtils.IS_JAVA_1_3);
assertFalse(SystemUtils.IS_JAVA_1_4);
assertFalse(SystemUtils.IS_JAVA_1_5);
assertFalse(SystemUtils.IS_JAVA_1_6);
assertTrue(SystemUtils.IS_JAVA_1_7);
assertFalse(SystemUtils.IS_JAVA_1_8);
} else if (javaVersion.startsWith("1.8")) {
assertFalse(SystemUtils.IS_JAVA_1_1);
assertFalse(SystemUtils.IS_JAVA_1_2);
assertFalse(SystemUtils.IS_JAVA_1_3);
assertFalse(SystemUtils.IS_JAVA_1_4);
assertFalse(SystemUtils.IS_JAVA_1_5);
assertFalse(SystemUtils.IS_JAVA_1_6);
assertFalse(SystemUtils.IS_JAVA_1_7);
assertTrue(SystemUtils.IS_JAVA_1_8);
} else {
System.out.println("Can't test IS_JAVA value: "+javaVersion);
}