1 /* 2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 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 /* 26 * @test 27 * 28 * @summary converted from VM Testbase nsk/jdi/IntegerArgument/intValue/intvalue002. 29 * VM Testbase keywords: [quick, jpda, jdi] 30 * VM Testbase readme: 31 * DESCRIPTION: 32 * The test for the implementation of an object of the type 33 * Connector.IntegerArgument. 34 * The test checks up that a result of the method 35 * IntegerArgument.intValue(int value) 36 * complies with the following requirements: 37 * "Returns the value of the argument as a int." 38 * when the value of the argument was set 39 * with the super.method setValue(String value). 40 * The cases tested are as follows: 41 * min() 42 * max() 43 * min()+1 44 * min()-1> 45 * max()+1 46 * The test works as follows: 47 * - Virtual Machine Manager is invoked. 48 * - First Connector.IntegerArgument object is searched among 49 * Arguments of Connectors. 50 * If no the intArgument is found out the test exits 51 * with the return value = 95 and a warning message. 52 * - To the above values the following check is applied: 53 * int value i1 set with the super.method 54 * intArgument.setValue(stringValueOf(i1)); 55 * must be equal to int value i2 get with 56 * i2 = intArgument.intValue(); 57 * In case of inequality of the values 58 * the test produces the return value 97 and 59 * a corresponding error message(s). 60 * Otherwise, the test is passed and produces 61 * the return value 95 and no message. 62 * COMMENTS: 63 * 64 * @library /vmTestbase 65 * /test/lib 66 * @run driver jdk.test.lib.FileInstaller . . 67 * @build nsk.jdi.IntegerArgument.intValue.intvalue002 68 * @run main/othervm PropertyResolvingWrapper 69 * nsk.jdi.IntegerArgument.intValue.intvalue002 70 * -verbose 71 * -arch=${os.family}-${os.simpleArch} 72 * -waittime=5 73 * -debugee.vmkind=java 74 * -transport.address=dynamic 75 * "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}" 76 */ 77 78