Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/BooleanValue/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.BooleanValue.equals;
25
26
import nsk.share.*;
27
import nsk.share.jpda.*;
28
import nsk.share.jdi.*;
29
30
/**
31
* <code>equals002a</code> is deugee's part of the test.<br>
32
* It contains the static fields with boundary values for each primitive type.<br>
33
* <code>ClassToCheck</code> delivers values for first parameter of <code>equals</code>.<br>
34
*/
35
public class equals002a {
36
37
static ClassToCheck testedObj = new ClassToCheck();
38
static String[] testedFields = {
39
"cmpObjNULL",
40
"cmpObject",
41
"cmpBoolMAX",
42
"cmpBoolMIN",
43
"cmpByteMAX",
44
"cmpByteMIN",
45
"cmpCharMAX",
46
"cmpCharMIN",
47
"cmpDoubleMAX",
48
"cmpDoubleMIN",
49
"cmpFloatMAX",
50
"cmpFloatMIN",
51
"cmpIntMAX",
52
"cmpIntMIN",
53
"cmpLongMAX",
54
"cmpLongMIN",
55
"cmpShortMAX",
56
"cmpShortMIN"
57
};
58
59
static Object cmpObjNULL = null;
60
static Object cmpObject = new Object();
61
static boolean cmpBoolMAX = true;
62
static boolean cmpBoolMIN = false;
63
static byte cmpByteMAX = Byte.MAX_VALUE;
64
static byte cmpByteMIN = Byte.MIN_VALUE;
65
static char cmpCharMAX = Character.MAX_VALUE;
66
static char cmpCharMIN = Character.MIN_VALUE;
67
static double cmpDoubleMAX= Double.MAX_VALUE;
68
static double cmpDoubleMIN= Double.MIN_VALUE;
69
static float cmpFloatMAX = Float.MAX_VALUE;
70
static float cmpFloatMIN = Float.MIN_VALUE;
71
static int cmpIntMAX = Integer.MAX_VALUE;
72
static int cmpIntMIN = Integer.MIN_VALUE;
73
static long cmpLongMAX = Long.MAX_VALUE;
74
static long cmpLongMIN = Long.MIN_VALUE;
75
static short cmpShortMAX = Short.MAX_VALUE;
76
static short cmpShortMIN = Short.MIN_VALUE;
77
78
public static void main (String argv[]) {
79
80
ArgumentHandler argHandler = new ArgumentHandler(argv);
81
Log log = new Log(System.err, argHandler);
82
IOPipe pipe = argHandler.createDebugeeIOPipe(log);
83
pipe.println("ready");
84
85
String instruction = pipe.readln();
86
87
if ( instruction.equals("quit") ) {
88
log.display("DEBUGEE> \"quit\" signal received.");
89
log.display("DEBUGEE> completed succesfully.");
90
System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE);
91
}
92
log.complain("DEBUGEE FAILURE> unexpected signal "
93
+ "(no \"quit\") - " + instruction);
94
log.complain("DEBUGEE FAILURE> TEST FAILED");
95
System.exit(Consts.TEST_FAILED + Consts.JCK_STATUS_BASE);
96
}
97
}
98
99
class ClassToCheck {
100
public boolean boolTRUE = true;
101
public boolean boolFALSE = false;
102
}
103
104