use of org.mmtk.policy.Space.SpaceVisitor in project JikesRVM by JikesRVM.
the class Harness method checkSpaces.
private static void checkSpaces() {
Set<String> expectedSpaces = PlanSpecificConfig.get(plan.getValue()).getExpectedSpaces();
final Set<String> actualSpaces = new HashSet<String>();
Space.visitSpaces(new SpaceVisitor() {
@Override
public void visit(Space s) {
actualSpaces.add(s.getName());
}
});
if (!expectedSpaces.equals(actualSpaces)) {
for (String name : expectedSpaces) {
if (!actualSpaces.contains(name)) {
System.err.printf("Expected space %s was not found%n", name);
}
}
for (String name : actualSpaces) {
if (!expectedSpaces.contains(name)) {
System.err.printf("Space %s was not expected%n", name);
}
}
throw new AssertionError("Space map does not match expectations");
}
}
Aggregations