use of org.openj9.test.util.HelloWorld in project openj9 by eclipse.
the class TestJmap method setupSuite.
@BeforeSuite
protected void setupSuite() {
getJdkUtilityPath(JMAP_COMMAND);
myId = TargetManager.getVmId();
// $NON-NLS-1$
assertNotNull(myId, "Attach ID missing");
log(myId);
/* make test objects */
hws = new ArrayList<>();
for (int i = 0; i < 3; i++) {
hws.add(new HelloWorld());
}
// $NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
objectArray = new String[][] { { "a", "b" }, { "c", "d" } };
objectVector = new Integer[] { Integer.valueOf(10), Integer.valueOf(20) };
primitiveArray = new int[][] { { 1, 2 }, { 3, 4 } };
primitiveVector = new long[] { 5, 6 };
expectedClasses = new String[] { HELLOWORLD_CLASSNAME, primitiveArray.getClass().getName(), primitiveVector.getClass().getName(), objectArray.getClass().getName(), objectVector.getClass().getName() };
}
use of org.openj9.test.util.HelloWorld in project openj9 by eclipse.
the class TestJmap method preserveHelloWorld.
@AfterTest
private void preserveHelloWorld() {
/* force the objects to stay alive */
for (HelloWorld instance : hws) {
log(instance.getClass().getName());
}
log(Integer.toString(objectArray.hashCode()));
log(Integer.toString(objectVector.hashCode()));
log(Integer.toString(primitiveArray.hashCode()));
log(Integer.toString(primitiveVector.hashCode()));
}
Aggregations