8196308: Update tests AllLineLocations and ClassesByName to use TestScaffold instead of JDIScaffold.
Summary: This is a subtask of JDK-4916621: update tests still using JDIScaffold to us TestScaffold instead.
Reviewed-by: sspitsyn, gthornbr
--- a/test/jdk/com/sun/jdi/AllLineLocations.java Mon Feb 12 14:28:04 2018 -0500
+++ b/test/jdk/com/sun/jdi/AllLineLocations.java Mon Feb 12 16:08:33 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
* @summary Test ReferenceType.allLineLocations
* @author Gordon Hirsch
*
- * @run build JDIScaffold VMConnection
+ * @run build TestScaffold VMConnection
* @run compile -g RefTypes.java
* @run build AllLineLocations
*
@@ -39,26 +39,22 @@
import java.util.List;
-public class AllLineLocations extends JDIScaffold {
- final String[] args;
+public class AllLineLocations extends TestScaffold {
public static void main(String args[]) throws Exception {
new AllLineLocations(args).startTests();
}
AllLineLocations(String args[]) {
- super();
- this.args = args;
+ super(args);
}
protected void runTests() throws Exception {
- connect(args);
- waitForVMStart();
/*
* Get to a point where the classes are loaded.
*/
- BreakpointEvent bp = resumeTo("RefTypes", "loadClasses", "()V");
+ BreakpointEvent bp = startTo("RefTypes", "loadClasses", "()V");
stepOut(bp.thread());
/*
@@ -220,6 +216,6 @@
System.out.println("AbstractAndNative: passed");
// Allow application to complete
- resumeToVMDeath();
+ resumeToVMDisconnect();
}
}
--- a/test/jdk/com/sun/jdi/ClassesByName.java Mon Feb 12 14:28:04 2018 -0500
+++ b/test/jdk/com/sun/jdi/ClassesByName.java Mon Feb 12 16:08:33 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
* loaded class list can be found with classesByName..
* @author Robert Field
*
- * @run build JDIScaffold VMConnection
+ * @run build TestScaffold VMConnection
* @run compile -g HelloWorld.java
* @run build ClassesByName
*
@@ -41,21 +41,18 @@
import java.util.List;
import java.util.Iterator;
-public class ClassesByName extends JDIScaffold {
- final String[] args;
+public class ClassesByName extends TestScaffold {
public static void main(String args[]) throws Exception {
new ClassesByName(args).startTests();
}
ClassesByName(String args[]) throws Exception {
- super();
- this.args = args;
+ super(args);
}
protected void runTests() throws Exception {
- connect(args);
- waitForVMStart();
+ startUp("ClassesByName");
List all = vm().allClasses();
for (Iterator it = all.iterator(); it.hasNext(); ) {
@@ -71,6 +68,6 @@
}
// Allow application to complete
- resumeToVMDeath();
+ resumeToVMDisconnect();
}
}