You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2014/03/21 03:02:04 UTC

svn commit: r1579865 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java

Author: ggregory
Date: Fri Mar 21 02:02:04 2014
New Revision: 1579865

URL: http://svn.apache.org/r1579865
Log:
<action issue="LANG-989" type="add" dev="ggregory">Add org.apache.commons.lang3.SystemUtils.IS_JAVA_1_8</action>

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java?rev=1579865&r1=1579864&r2=1579865&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java Fri Mar 21 02:02:04 2014
@@ -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);
         }