Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/ArrayReference/setValue/setvalue001a.java
41162 views
/*1* Copyright (c) 2001, 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*/222324package nsk.jdi.ArrayReference.setValue;2526import nsk.share.*;27import nsk.share.jpda.*;28import nsk.share.jdi.*;293031public class setvalue001a {32public static void main (String argv[]) {33ArgumentHandler argHandler = new ArgumentHandler(argv);34Log log = new Log(System.err, argHandler);35IOPipe pipe = argHandler.createDebugeeIOPipe(log);36setvalue001aClassToCheck classToCheck = new setvalue001aClassToCheck();3738log.display("DEBUGEE> debugee started.");39pipe.println("ready");40String instruction = pipe.readln();41if (instruction.equals("quit")) {42log.display("DEBUGEE> \"quit\" signal recieved.");43log.display("DEBUGEE> completed succesfully.");44System.exit(95);45}46log.complain("DEBUGEE FAILURE> unexpected signal "47+ "(no \"quit\") - " + instruction);48log.complain("DEBUGEE FAILURE> TEST FAILED");49System.exit(97);50}51}5253class setvalue001aClassToCheck {5455// Each array has 18 components56// 0..8 are to set and get values, 9..17 are to get sample Value in57// debugger58static boolean z1[] = {false, true, false, true, true, true, false,59false, true,60true, false, true, false, false, false, true,61true, false};62static byte b1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,63Byte.MIN_VALUE, -1, 0, 1, Byte.MAX_VALUE,64Byte.MIN_VALUE + 1, -4, 4, Byte.MAX_VALUE - 1};65static char c1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,66Character.MIN_VALUE, '\u00ff', '\uff00',67Character.MAX_VALUE, Character.MIN_VALUE + 1,68'\u1234', '\u4321', '\u8888',69Character.MAX_VALUE - 1};70static double d1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,71Double.NEGATIVE_INFINITY, Double.MIN_VALUE, -1, -0,720, 1, Double.MAX_VALUE, Double.POSITIVE_INFINITY,73Double.NaN};74static float f1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,75Float.NEGATIVE_INFINITY, Float.MIN_VALUE, -1, -0,760, 1, Float.MAX_VALUE, Float.POSITIVE_INFINITY,77Float.NaN};78static int i1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,79Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE,80Integer.MIN_VALUE + 1, -2, 2, Integer.MAX_VALUE - 1};81static long l1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,82Long.MIN_VALUE, -1, 0, 1, Long.MAX_VALUE,83Long.MIN_VALUE + 1, -2, 2, Long.MAX_VALUE - 1};84static short r1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,85Short.MIN_VALUE, -1, 0, 1, Short.MAX_VALUE,86Short.MIN_VALUE + 1, -3, 3, Short.MAX_VALUE - 1};8788static final long lF1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,891, 2, 3, 4, 5, 6, 7, 8, 9};90static private long lP1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,91100, 101, 102, 103, 104, 105, 106, 107, 108};92static public long lU1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,93-1, -2, -3, -4, -5, -6, -7, -8, -9};94static protected long lR1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,95Long.MIN_VALUE, Long.MIN_VALUE + 1,96Long.MIN_VALUE + 2, Long.MIN_VALUE + 3,97Long.MIN_VALUE + 4, Long.MIN_VALUE + 5,98Long.MIN_VALUE + 6, Long.MIN_VALUE + 7,99Long.MIN_VALUE + 8};100static transient long lT1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,101Long.MAX_VALUE, Long.MAX_VALUE - 1,102Long.MAX_VALUE - 2, Long.MAX_VALUE - 3,103Long.MAX_VALUE - 4, Long.MAX_VALUE - 5,104Long.MAX_VALUE - 6, Long.MAX_VALUE - 7,105Long.MAX_VALUE - 8};106static volatile long lV1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8,1071, -1, 1, 0, -1, 1, 0, -1, 1};108}109110111