< prev index next >

jdk/test/java/lang/Runtime/Version/Basic.java

Print this page




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @summary Unit test for jdk.Version.
  27  * @bug 8072379
  28  */
  29 
  30 import java.lang.reflect.InvocationTargetException;
  31 import java.lang.reflect.Method;
  32 import java.math.BigInteger;
  33 import java.util.stream.Collectors;
  34 import java.util.Arrays;
  35 import java.util.ArrayList;
  36 import java.util.List;
  37 import java.util.Optional;
  38 
  39 import jdk.Version;
  40 import static java.lang.System.out;
  41 
  42 public class Basic {
  43     private static final Class<? extends Throwable> IAE
  44         = IllegalArgumentException.class;
  45     private static final Class<? extends Throwable> NPE
  46         = NullPointerException.class;
  47     private static final Class<? extends Throwable> NFE
  48         = NumberFormatException.class;
  49     private static final Class<?> VERSION = Version.class;
  50 
  51     private static final BigInteger TOO_BIG
  52         = (BigInteger.valueOf(Integer.MAX_VALUE)).add(BigInteger.ONE);
  53     private static final String TOO_BIG_STR = TOO_BIG.toString();
  54 
  55     public static void main(String ... args) {
  56 
  57         //// Tests for parse(), major(), minor(), security(), pre(),
  58         //// build(), opt(), version(), toString()
  59         //   v                          M     m sec pre bld opt




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @summary Unit test for java.lang.Runtime.Version.
  27  * @bug 8072379 8144062
  28  */
  29 
  30 import java.lang.reflect.InvocationTargetException;
  31 import java.lang.reflect.Method;
  32 import java.math.BigInteger;
  33 import java.util.stream.Collectors;
  34 import java.util.Arrays;
  35 import java.util.ArrayList;
  36 import java.util.List;
  37 import java.util.Optional;
  38 
  39 import java.lang.Runtime.Version;
  40 import static java.lang.System.out;
  41 
  42 public class Basic {
  43     private static final Class<? extends Throwable> IAE
  44         = IllegalArgumentException.class;
  45     private static final Class<? extends Throwable> NPE
  46         = NullPointerException.class;
  47     private static final Class<? extends Throwable> NFE
  48         = NumberFormatException.class;
  49     private static final Class<?> VERSION = Version.class;
  50 
  51     private static final BigInteger TOO_BIG
  52         = (BigInteger.valueOf(Integer.MAX_VALUE)).add(BigInteger.ONE);
  53     private static final String TOO_BIG_STR = TOO_BIG.toString();
  54 
  55     public static void main(String ... args) {
  56 
  57         //// Tests for parse(), major(), minor(), security(), pre(),
  58         //// build(), opt(), version(), toString()
  59         //   v                          M     m sec pre bld opt


< prev index next >