HeapViewerTest.java revision 0
342N/A/*
1879N/A * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
342N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
342N/A *
342N/A * This code is free software; you can redistribute it and/or modify it
342N/A * under the terms of the GNU General Public License version 2 only, as
342N/A * published by the Free Software Foundation.
342N/A *
342N/A * This code is distributed in the hope that it will be useful, but WITHOUT
342N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
342N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
342N/A * version 2 for more details (a copy is included in the LICENSE file that
342N/A * accompanied this code).
342N/A *
342N/A * You should have received a copy of the GNU General Public License version
342N/A * 2 along with this work; if not, write to the Free Software Foundation,
342N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
342N/A *
1472N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
1472N/A * CA 95054 USA or visit www.sun.com if you need additional information or
1472N/A * have any questions.
342N/A */
342N/A
342N/A
1879N/A/* @test
1879N/A * @bug 5033539
1879N/A * @summary Test jvmti demo heapViewer
1879N/A *
1879N/A * @compile ../DemoRun.java
1879N/A * @compile ../HeapUser.java
1879N/A * @build HeapViewerTest
1879N/A * @run main HeapViewerTest HeapUser
1879N/A */
1879N/A
1879N/Apublic class HeapViewerTest {
1879N/A
1879N/A public static void main(String args[]) throws Exception {
342N/A DemoRun demo;
342N/A
342N/A /* Run demo that uses JVMTI heapViewer agent (no options) */
342N/A demo = new DemoRun("heapViewer", "" /* options to heapViewer */ );
342N/A demo.runit(args[0]);
342N/A
342N/A /* Make sure patterns in output look ok */
342N/A if (demo.output_contains("ERROR")) {
342N/A throw new RuntimeException("Test failed - ERROR seen in output");
342N/A }
342N/A
342N/A /* Must be a pass. */
342N/A System.out.println("Test passed - cleanly terminated");
342N/A }
342N/A}
342N/A