Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/jdi/BScenarios/singlethrd/tc03x002a.java
41160 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.BScenarios.singlethrd;
25
26
import nsk.share.*;
27
import nsk.share.jpda.*;
28
import nsk.share.jdi.*;
29
30
// THIS TEST IS LINE NUMBER SENSITIVE
31
32
/**
33
* <code>tc03x002a</code> is deugee's part of the tc02x001.
34
*/
35
public class tc03x002a {
36
37
public final static int checkLastLine1 = 76;
38
public final static int checkLastLine2 = 78;
39
static Log log;
40
41
public static void main (String argv[]) {
42
ArgumentHandler argHandler = new ArgumentHandler(argv);
43
log = new Log(System.err, argHandler);
44
IOPipe pipe = argHandler.createDebugeeIOPipe(log);
45
pipe.println(tc03x002.SGL_READY);
46
47
tc03x002a obj = null;
48
String instr;
49
do {
50
instr = pipe.readln();
51
log.display("instruction \"" + instr +"\"");
52
if (instr.equals(tc03x002.SGL_LOAD)) {
53
tc03x002aClass1.loadThis = true;
54
performTest();
55
} else if (instr.equals(tc03x002.SGL_QUIT)) {
56
log.display(instr);
57
break;
58
} else {
59
log.complain("DEBUGEE> unexpected signal of debugger.");
60
System.exit(Consts.TEST_FAILED + Consts.JCK_STATUS_BASE);
61
}
62
} while (true);
63
log.display("completed succesfully.");
64
System.exit(Consts.TEST_PASSED + Consts.JCK_STATUS_BASE);
65
}
66
67
public static void performTest() {
68
log.display("performTest::creating tc03x002aClass1 object");
69
new tc03x002aClass1();
70
log.display("performTest::tc03x002aClass1 object is created");
71
}
72
}
73
74
class tc03x002aClass1 {
75
76
static boolean loadThis = false; // checkLastLine1
77
78
tc03x002aClass1() { // checkLastLine2
79
tc03x002a.log.display("tc03x002aClass1::constructor is called");
80
}
81
}
82
83