author | iignatyev |
Fri, 14 Sep 2018 14:02:57 -0700 | |
changeset 51754 | 594919232b8f |
parent 51716 | e7459270ca63 |
permissions | -rw-r--r-- |
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
1 |
/* |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
4 |
* |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
7 |
* published by the Free Software Foundation. |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
8 |
* |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
13 |
* accompanied this code). |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
14 |
* |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
18 |
* |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
21 |
* questions. |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
22 |
*/ |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
23 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
24 |
/* |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
25 |
* @test |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
26 |
* @bug 6805864 |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
27 |
* @summary Redefine an abstract class that is called via a concrete |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
28 |
* class and via two interface objects and verify that the right |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
29 |
* methods are called. |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
30 |
* @comment converted from test/jdk/com/sun/jdi/RedefineAbstractClass.sh |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
31 |
* |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
32 |
* @library /test/lib |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
33 |
* @compile -g RedefineAbstractClass.java |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
34 |
* @run main/othervm RedefineAbstractClass |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
35 |
*/ |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
36 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
37 |
import jdk.test.lib.process.OutputAnalyzer; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
38 |
import lib.jdb.ClassTransformer; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
39 |
import lib.jdb.JdbCommand; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
40 |
import lib.jdb.JdbTest; |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
41 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
42 |
class RedefineAbstractClassTarg { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
43 |
public static void main(String[] args) { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
44 |
System.out.println("This is RedefineAbstractClass"); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
45 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
46 |
MyConcreteClass foo = new MyConcreteClass(); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
47 |
// do the work once before redefine |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
48 |
foo.doWork(); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
49 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
50 |
System.out.println("stop here for redefine"); // @1 breakpoint |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
51 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
52 |
// do the work again after redefine |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
53 |
foo.doWork(); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
54 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
55 |
System.out.println("stop here to check results"); // @2 breakpoint |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
56 |
} |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
57 |
} |
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
58 |
|
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
59 |
interface MyInterface1 { |
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
60 |
public boolean checkFunc(); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
61 |
public boolean isMyInterface1(); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
62 |
} |
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
63 |
|
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
64 |
interface MyInterface2 { |
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
65 |
public boolean checkFunc(); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
66 |
public boolean isMyInterface2(); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
67 |
} |
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
68 |
|
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
69 |
abstract class MyAbstractClass implements MyInterface1, MyInterface2 { |
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
70 |
static int counter = 0; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
71 |
public boolean checkFunc() { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
72 |
counter++; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
73 |
System.out.println("MyAbstractClass.checkFunc() called."); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
74 |
// @1 uncomment System.out.println("This is call " + counter + " to checkFunc"); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
75 |
return true; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
76 |
} |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
77 |
public boolean isMyInterface1() { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
78 |
System.out.println("MyAbstractClass.isMyInterface1() called."); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
79 |
return true; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
80 |
} |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
81 |
public boolean isMyInterface2() { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
82 |
System.out.println("MyAbstractClass.isMyInterface2() called."); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
83 |
return true; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
84 |
} |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
85 |
} |
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
86 |
|
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
87 |
class MyConcreteClass extends MyAbstractClass { |
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
88 |
public void doWork() { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
89 |
// checkFunc() is called via invokevirtual here; MyConcreteClass |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
90 |
// inherits via MyAbstractClass |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
91 |
System.out.println("In doWork() calling checkFunc(): " + checkFunc()); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
92 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
93 |
MyInterface1 if1 = (MyInterface1) this; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
94 |
// checkFunc() is called via invokeinterface here; this call will |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
95 |
// use the first itable entry |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
96 |
System.out.println("In doWork() calling if1.checkFunc(): " + if1.checkFunc()); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
97 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
98 |
MyInterface2 if2 = (MyInterface2) this; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
99 |
// checkFunc() is called via invokeinterface here; this call will |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
100 |
// use the second itable entry |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
101 |
System.out.println("In doWork() calling if2.checkFunc(): " + if2.checkFunc()); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
102 |
} |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
103 |
} |
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
104 |
|
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
105 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
106 |
public class RedefineAbstractClass extends JdbTest { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
107 |
public static void main(String argv[]) { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
108 |
new RedefineAbstractClass().run(); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
109 |
} |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
110 |
|
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
111 |
private RedefineAbstractClass() { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
112 |
super(DEBUGGEE_CLASS, SOURCE_FILE); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
113 |
} |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
114 |
|
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
115 |
private static final String DEBUGGEE_CLASS = RedefineAbstractClassTarg.class.getName(); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
116 |
private static final String SOURCE_FILE = "RedefineAbstractClass.java"; |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
117 |
private static final String ABSTRACT_CLASS = "MyAbstractClass"; |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
118 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
119 |
@Override |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
120 |
protected void runCases() { |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
121 |
setBreakpoints(1); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
122 |
setBreakpoints(2); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
123 |
jdb.command(JdbCommand.run()); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
124 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
125 |
// modified version of redefineClass function |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
126 |
String transformedClassFile = ClassTransformer.fromTestSource(SOURCE_FILE) |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
127 |
.transform(1, ABSTRACT_CLASS, "-g"); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
128 |
jdb.command(JdbCommand.redefine(ABSTRACT_CLASS, transformedClassFile)); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
129 |
// end modified version of redefineClass function |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
130 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
131 |
// this will continue to the second breakpoint |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
132 |
jdb.command(JdbCommand.cont()); |
15654
aa1e472aa6b9
8007420: add test for 6805864 to com/sun/jdi, add test for 7182152 to java/lang/instrument
dcubed
parents:
diff
changeset
|
133 |
|
51716
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
134 |
new OutputAnalyzer(getDebuggeeOutput()) |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
135 |
.shouldContain("This is call 4 to checkFunc") |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
136 |
.shouldContain("This is call 5 to checkFunc") |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
137 |
.shouldContain("This is call 6 to checkFunc"); |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
138 |
} |
e7459270ca63
8210560: [TEST] convert com/sun/jdi redefineClass-related tests
amenkov
parents:
47216
diff
changeset
|
139 |
} |