Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/InterfaceType/implementors/implementors001/TestDescription.java
43064 views
/*1* Copyright (c) 2018, 2020, 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*/222324/*25* @test26*27* @summary converted from VM Testbase nsk/jdi/InterfaceType/implementors/implementors001.28* VM Testbase keywords: [jpda, jdi]29* VM Testbase readme:30* DESCRIPTION:31* The test for the implementation of an object of the type32* InterfaceType.33* The test checks up that a result of the method34* com.sun.jdi.InterfaceType.implementors()35* complies with tits spec:36* public java.util.List implementors()37* Gets the currently prepared classes which directly implement this interface.38* The returned list contains only those classes that declared this interface39* in their "implements" clause.40* Returns: a List of ClassType objects each mirroring a class41* implementing this interface.42* If none exist, returns a zero length List.43* Throws: ObjectCollectedException -44* if this interface has been unloaded and garbage collected.45* The test works as follows:46* The debugger program - nsk.jdi.InterfaceType.implementors.implementors001;47* the debuggee program - nsk.jdi.InterfaceType.implementors.implementors001a.48* Using nsk.jdi.share classes,49* the debugger gets the debuggee running on another JavaVM,50* creates the object debuggee.VM,51* establishes a pipe with the debuggee program, and then52* send to the programm commands, to which the debuggee replies53* via the pipe. Upon getting reply,54* the debugger calls corresponding debuggee.VM methods to get55* needed data and compares the data got to the data expected.56* In case of error the test produces the return value 97 and57* a corresponding error message(s).58* Otherwise, the test is passed and produces59* the return value 95 and no message.60* COMMENTS:61*62* @library /vmTestbase63* /test/lib64* @build nsk.jdi.InterfaceType.implementors.implementors00165* nsk.jdi.InterfaceType.implementors.implementors001a66* @run main/othervm67* nsk.jdi.InterfaceType.implementors.implementors00168* -verbose69* -arch=${os.family}-${os.simpleArch}70* -waittime=571* -debugee.vmkind=java72* -transport.address=dynamic73* -debugee.vmkeys="${test.vm.opts} ${test.java.opts}"74*/75767778