Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/compareTo/compareto001/TestDescription.java
42781 views
1
/*
2
* Copyright (c) 2018, 2020, 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/IntegerValue/compareTo/compareto001.
29
* VM Testbase keywords: [quick, jpda, jdi]
30
* VM Testbase readme:
31
* DESCRIPTION:
32
* The test for the compareTo(Object o) method of com.sun.jdi.IntegerValue
33
* interface. This method is inherited from java.lang.Comparable interface.
34
* The test checks the following assertions which imply from spec for
35
* Comparable.compareTo(Object o):
36
* - (x.compareTo(y) == 0) is identical to (x.equals(y) == true);
37
* - (x.compareTo(y) == 0) is identical to (y.compareTo(x) == 0);
38
* - if (x.compareTo(y) == i) then (y.compareTo(x) == -i);
39
* - if (x.compareTo(y) > 0) and (y.compareTo(z) > 0), then (x.compareTo(z) > 0);
40
* - if an argument is null, then NullPointerException is thrown;
41
* - if an argument is not of IntegerValue type, then a ClassCastException is thrown.
42
* where 'x', 'y' and 'z' denote IntegerValue object.
43
* The debugger program - nsk.jdi.IntegerValue.compareto.compareto001;
44
* the debuggee program - nsk.jdi.IntegerValue.compareto.compareto001a;
45
* The test works as follows:
46
* Using nsk.jdi.share classes, the debugger connects to the debuggee.
47
* Then the debugger gets a list of integer fields of debuggee's object of
48
* compareto001aClassToCheck type. For every field a mirror of IntegerValue type
49
* is created and the assertions are checked. A various values for comparison
50
* are got from values of mirrors of debuggee's static fields.
51
* In case of error the test produces the return value 97 and a corresponding
52
* error message(s). Otherwise, the test is passed and produces the return
53
* value 95 and no message.
54
* COMMENTS:
55
*
56
* @library /vmTestbase
57
* /test/lib
58
* @build nsk.jdi.IntegerValue.compareTo.compareto001
59
* nsk.jdi.IntegerValue.compareTo.compareto001a
60
* @run main/othervm
61
* nsk.jdi.IntegerValue.compareTo.compareto001
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
71