EnumTest.java revision 0
383N/A * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. 154N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 154N/A * This code is free software; you can redistribute it and/or modify it 154N/A * under the terms of the GNU General Public License version 2 only, as 154N/A * published by the Free Software Foundation. 154N/A * This code is distributed in the hope that it will be useful, but WITHOUT 154N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 154N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 154N/A * version 2 for more details (a copy is included in the LICENSE file that 154N/A * accompanied this code). 154N/A * You should have received a copy of the GNU General Public License version 154N/A * 2 along with this work; if not, write to the Free Software Foundation, 154N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 154N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 154N/A * CA 95054 USA or visit www.sun.com if you need additional information or 154N/A * @summary JPDA: Add support for enums 154N/A * @run build TestScaffold VMConnection TargetListener TargetAdapter 383N/A /********** target program **********/ /********** test program **********/ /********** test core **********/ * Get to the top of main() * to determine targetClass fail(
"failure: isEnum() is false but should be true");
fail(
"failure: isEnum() is true for EnumTarg but should be false");
fail(
"failure: The 'penny' field is not marked " +
* This isn't really part of the test, it just * shows how to look at all the enum constants, * but not necessarily in the correct order * deal with results of test * if anything has called failure("foo") testFailed will be true