ModificationWatchpoints.java revision 0
/*
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/**
* @test
* @bug 4409582
* @summary Test all info returned by modification watchpoints
*
* @author Daniel Prusa (or someone in the FFJ group)
* @author Robert Field (modified to JDIScaffold)
*
* @library scaffold
* @run build JDIScaffold VMConnection
* @run compile -g ModificationWatchpoints.java
*/
/********** target program **********/
class ModificationWatchpointsTarg {
public static final int RepeatCount = 3;
public static final byte ByteVal = -17;
public static final char CharVal = 'Y';
public static final short ShortVal = -412;
public static final int IntVal = -711618;
public static final long LongVal = 0x1234567890123456L;
public static final float FloatVal = 7.986f;
public static final double DoubleVal = 3.14159265358979d;
static byte sByte;
static char sChar;
static short sShort;
static int sInt;
static long sLong;
static float sFloat;
static double sDouble;
byte iByte;
char iChar;
short iShort;
int iInt;
long iLong;
float iFloat;
double iDouble;
void iByteSet() {
}
void iCharSet() {
}
void iShortSet() {
}
void iIntSet() {
}
void iLongSet() {
}
void iFloatSet() {
}
void iDoubleSet() {
}
void iStringSet() {
}
void iObjectSet() {
}
static void sByteSet() {
}
static void sCharSet() {
}
static void sShortSet() {
}
static void sIntSet() {
}
static void sLongSet() {
}
static void sFloatSet() {
}
static void sDoubleSet() {
}
static void sStringSet() {
}
static void sObjectSet() {
}
void iUpdate(){
iByteSet();
iCharSet();
iShortSet();
iIntSet();
iLongSet();
iFloatSet();
iDoubleSet();
iStringSet();
iObjectSet();
}
static void sUpdate(){
sByteSet();
sCharSet();
sShortSet();
sIntSet();
sLongSet();
sFloatSet();
sDoubleSet();
sStringSet();
sObjectSet();
}
for (int i = RepeatCount; i > 0; i--) {
sUpdate();
}
}
}
public class ModificationWatchpoints extends TestScaffold {
super(args);
}
}
/********** event handlers **********/
}
/********** test core **********/
}
/*
* Get to the top of main():
*/
/*
* Set watchpoints
*/
if (!testFailed) {
}
}
if (!testFailed) {
println("ModificationWatchpoints: passed");
} else {
throw new Exception("ModificationWatchpoints: failed");
}
}
/********** request wrapper **********/
class MWP {
private final Value expectedValue;
public int eventCount = 0;
public boolean failed = false;
this.expectedValue = value;
}
/*
* Sets watchpoint with specified properties.
*/
public void set() {
}
}
/**
* Sets watchpoint for given class.
*/
}
", new value: " + val);
failure("FAILURE: value should be: " +
}
}
eventCount++;
}
public void checkEventCounts(int expectedCount) {
if (eventCount != expectedCount) {
}
}
} // MWP inner class .................
}