1 /*
2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.
8  *
9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 
25 /*
26  * @test
27  *
28  * @summary converted from VM Testbase nsk/jdi/StringArgument/isValid/isvalid003.
29  * VM Testbase keywords: [quick, jpda, jdi]
30  * VM Testbase readme:
31  * DESCRIPTION:
32  *     The test for the implementation of an object of the type
33  *     Connector.StringArgument.
34  *     The test checks up that a result of the method
35  *     com.sun.jdi.connect.Connector.StringArgument.isValid()
36  *     complies with its specification:
37  *         "Returns:  true always"
38  *     when parameter is the null-string.
39  *     The test works as follows:
40  *     - Virtual Machine Manager is invoked.
41  *     - First Connector.StringArgument object is searched among
42  *     Arguments of Connectors.
43  *     If no the argument is found out the test exits
44  *     with the return value = 95 and a warning message.
45  *     - The following checks are applied:
46  *     String sNull = null;
47  *     IF    !argument.isValid(sNull)
48  *     THEN  an error detected
49  *     ELSE  the check passed
50  *     In case of error the test produces the return value 97 and
51  *     a corresponding error message(s).
52  *     Otherwise, the test is passed and produces
53  *     the return value 95 and no message.
54  * COMMENTS:
55  *
56  * @library /vmTestbase
57  *          /test/lib
58  * @run driver jdk.test.lib.FileInstaller . .
59  * @build nsk.jdi.StringArgument.isValid.isvalid003
60  * @run main/othervm PropertyResolvingWrapper
61  *      nsk.jdi.StringArgument.isValid.isvalid003
62  *      -verbose
63  *      -arch=${os.family}-${os.simpleArch}
64  *      -waittime=5
65  *      -debugee.vmkind=java
66  *      -transport.address=dynamic
67  *      "-debugee.vmkeys=${test.vm.opts} ${test.java.opts}"
68  */
69 
70