Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue003a.java
41162 views
/*1* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223package nsk.jdi.ArrayReference.setValue;2425import nsk.share.*;26import nsk.share.jpda.*;27import nsk.share.jdi.*;282930public class setvalue003a {3132static setvalue003aClassToCheck testedObj = new setvalue003aClassToCheck();3334// Value parameter's array for debugee's int-arrays35public static byte[] BYTE_VALUE_PARAM = { Byte.MIN_VALUE,36Byte.MAX_VALUE37};3839public static char[] CHAR_VALUE_PARAM = { Character.MIN_VALUE,40Character.MAX_VALUE41};4243public static double[] DBL_VALUE_PARAM = { Double.MIN_VALUE,44Double.MAX_VALUE,45Double.NEGATIVE_INFINITY,46Double.POSITIVE_INFINITY47};4849public static float[] FLT_VALUE_PARAM = { Float.MIN_VALUE,50Float.MAX_VALUE,51Float.NEGATIVE_INFINITY,52Float.POSITIVE_INFINITY53};5455public static int[] INT_VALUE_PARAM = { Integer.MIN_VALUE,56Integer.MAX_VALUE57};5859public static long[] LNG_VALUE_PARAM = { Long.MIN_VALUE,60Long.MAX_VALUE61};6263public static short[] SHORT_VALUE_PARAM = { Short.MIN_VALUE,64Short.MAX_VALUE65};6667public static void main (String argv[]) {6869ArgumentHandler argHandler = new ArgumentHandler(argv);70Log log = new Log(System.err, argHandler);71IOPipe pipe = argHandler.createDebugeeIOPipe(log);72pipe.println("ready");7374String instruction = pipe.readln();7576if ( instruction.equals("quit") ) {77log.display("DEBUGEE> \"quit\" signal received.");78log.display("DEBUGEE> completed succesfully.");79System.exit(setvalue003.TEST_PASSED + setvalue003.JCK_STATUS_BASE);80}81log.complain("DEBUGEE FAILURE> unexpected signal "82+ "(no \"quit\") - " + instruction);83log.complain("DEBUGEE FAILURE> TEST FAILED");84System.exit(setvalue003.TEST_FAILED + setvalue003.JCK_STATUS_BASE);85}86}8788class setvalue003aClassToCheck {89public byte[] publicByteArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};90protected byte[] protecByteArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};91private byte[] privatByteArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};9293public char[] publicCharArr = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};94protected char[] protecCharArr = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};95private char[] privatCharArr = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};9697public double[] publicDoubleArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};98protected double[] protecDoubleArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};99private double[] privatDoubleArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};100101public float[] publicFloatArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};102protected float[] protecFloatArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};103private float[] privatFloatArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};104105public int[] publicIntArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};106protected int[] protecIntArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};107private int[] privatIntArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};108109public long[] publicLongArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};110protected long[] protecLongArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};111private long[] privatLongArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};112113public short[] publicShortArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};114protected short[] protecShortArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};115private short[] privatShortArr = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};116}117118119