/*
* 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// TEMPLATE: global replace "Template" with your test name
// TEMPLATE: change bug number and fill out <SUMMARY> and <AUTHOR>
// TEMPLATE: delete TEMPLATE lines
/**
* @test
* @bug 0000000
* @summary <SUMMARY>
*
* @author <AUTHOR>
*
* @run build TestScaffold VMConnection TargetListener TargetAdapter
* @run compile -g TemplateTest.java
* @run main TemplateTest
*/
/********** target program **********/
class TemplateTarg {
}
}
/********** test program **********/
super(args);
}
}
/********** event handlers **********/
// TEMPLATE: delete the handlers you don't need
// TEMPLATE: defaults are in TargetAdapter
println("Got event set");
}
println("Got event");
}
println("Got BreakpointEvent");
}
println("Got ExceptionEvent");
}
println("Got StepEvent");
}
println("Got ClassPrepareEvent");
}
println("Got ClassUnloadEvent");
}
println("Got MethodEntryEvent");
}
println("Got MethodExitEvent");
}
println("Got AccessWatchpointEvent");
}
println("Got ModificationWatchpointEvent");
}
println("Got ThreadStartEvent");
}
println("Got ThreadDeathEvent");
}
println("Got VMStartEvent");
}
println("Got VMDeathEvent");
}
println("Got VMDisconnectEvent");
}
/********** test core **********/
/*
* Get to the top of main()
* to determine targetClass and mainThread
*/
// TEMPLATE: set things up
// TEMPLATE: for example
/*
* Set event requests
*/
/*
* resume the target listening for events
*/
/*
* deal with results of test
* if anything has called failure("foo") testFailed will be true
*/
if (!testFailed) {
println("TemplateTest: passed");
} else {
throw new Exception("TemplateTest: failed");
}
}
}