Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/IntegerValue/equals/equals002a.java
41161 views
1
/*
2
* Copyright (c) 2002, 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
package nsk.jdi.IntegerValue.equals;
25
26
import nsk.share.*;
27
import nsk.share.jpda.*;
28
import nsk.share.jdi.*;
29
30
31
/**
32
* <code>equals002a</code> is deugee's part of the test.<br>
33
* It contains the static fields with boundary values for each primitive type.<br>
34
* <code>ClassToCheck</code> delivers values for first parameter of <code>equals</code>.<br>
35
*/
36
public class equals002a {
37
38
static ClassToCheck testedObj = new ClassToCheck();
39
static String[] testedFields = {
40
"cmpObjNULL",
41
"cmpObject",
42
"cmpBoolMAX",
43
"cmpBoolMIN",
44
"cmpByteMAX",
45
"cmpByte1",
46
"cmpByte0",
47
"cmpByte_1",
48
"cmpByteMIN",
49
"cmpCharMAX",
50
"cmpCharMIN",
51
"cmpDoubleMAX",
52
"cmpDouble1",
53
"cmpDouble0",
54
"cmpDouble_1",
55
"cmpDoubleMIN",
56
"cmpFloatMAX",
57
"cmpFloat1",
58
"cmpFloat0",
59
"cmpFloat_1",
60
"cmpFloatMIN",
61
"cmpIntMAX",
62
"cmpInt1",
63
"cmpInt0",
64
"cmpInt_1",
65
"cmpIntMIN",
66
"cmpLongMAX",
67
"cmpLong1",
68
"cmpLong0",
69
"cmpLong_1",
70
"cmpLongMIN",
71
"cmpShortMAX",
72
"cmpShort1",
73
"cmpShort0",
74
"cmpShort_1",
75
"cmpShortMIN"
76
};
77
78
static Object cmpObjNULL = null;
79
static Object cmpObject = new Object();
80
static boolean cmpBoolMAX = true;
81
static boolean cmpBoolMIN = false;
82
static byte cmpByteMAX = Byte.MAX_VALUE;
83
static byte cmpByte1 = 1;
84
static byte cmpByte0 = 0;
85
static byte cmpByte_1 = -1;
86
static byte cmpByteMIN = Byte.MIN_VALUE;
87
static char cmpCharMAX = Character.MAX_VALUE;
88
static char cmpCharMIN = Character.MIN_VALUE;
89
static double cmpDoubleMAX= Double.MAX_VALUE;
90
static double cmpDouble1 = 1;
91
static double cmpDouble0 = 0;
92
static double cmpDouble_1 = -1;
93
static double cmpDoubleMIN= Double.MIN_VALUE;
94
static float cmpFloatMAX = Float.MAX_VALUE;
95
static float cmpFloat1 = 1;
96
static float cmpFloat0 = 0;
97
static float cmpFloat_1 = -1;
98
static float cmpFloatMIN = Float.MIN_VALUE;
99
static int cmpIntMAX = Integer.MAX_VALUE;
100
static int cmpInt1 = 1;
101
static int cmpInt0 = 0;
102
static int cmpInt_1 = -1;
103
static int cmpIntMIN = Integer.MIN_VALUE;
104
static long cmpLongMAX = Long.MAX_VALUE;
105
static long cmpLong1 = 1;
106
static long cmpLong0 = 0;
107
static long cmpLong_1 = -1;
108
static long cmpLongMIN = Long.MIN_VALUE;
109
static short cmpShortMAX = Short.MAX_VALUE;
110
static short cmpShort1 = 1;
111
static short cmpShort0 = 0;
112
static short cmpShort_1 = -1;
113
static short cmpShortMIN = Short.MIN_VALUE;
114
115
public static void main (String argv[]) {
116
117
ArgumentHandler argHandler = new ArgumentHandler(argv);
118
Log log = new Log(System.err, argHandler);
119
IOPipe pipe = argHandler.createDebugeeIOPipe(log);
120
pipe.println("ready");
121
122
String instruction = pipe.readln();
123
124
if ( instruction.equals("quit") ) {
125
log.display("DEBUGEE> \"quit\" signal received.");
126
log.display("DEBUGEE> completed succesfully.");
127
System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE);
128
}
129
log.complain("DEBUGEE FAILURE> unexpected signal "
130
+ "(no \"quit\") - " + instruction);
131
log.complain("DEBUGEE FAILURE> TEST FAILED");
132
System.exit(Consts.TEST_FAILED + Consts.JCK_STATUS_BASE);
133
}
134
}
135
136
class ClassToCheck {
137
public int integerMAX = Integer.MAX_VALUE;
138
public int int1 = 1;
139
public int int0 = 0;
140
public int int_1 = -1;
141
public int integerMIN = Integer.MIN_VALUE;
142
}
143
144