private final int WIDTH = 128;
private final int HEIGHT = 128;
public void runStaticTest(String algo, String name, int width, int height) {
TreeParameters tp;
Tree tree;
// ensure we have an output directory
File treeTgt = new File(String.format("./gallery-%s/trees/", name));
if(!treeTgt.exists()) {
Assert.assertTrue(treeTgt.mkdirs());
}
for(int i = 0; i < GALLERY_SIZE; i++) {
System.out.format("At image: %03d\n", i);
InputStream data = new ByteArrayInputStream(String.format("%03d", i).getBytes());
tp = TreeParameters.createInstanceOrDie(algo, null, data);
tree = new Tree(tp);
// write out the tree we built
try {
tree.show(String.format("./gallery-%s/trees/%03d.txt", name, i));
} catch(IOException e) {
fail(e.toString());
}
ImageParameters ip = new ImageParameters(width, height);
tree.setGenerationParameters(ip);
byte[] actual = tree.generateCurrentFrame();
TestOperationIntegration.compare(actual, width, height, String.format("./test/reference-%s/%03d.png", name, i), null);
OutputParameters op = new OutputParameters(String.format("./gallery-%s/%03d.png", name, i), width, height);
Output out = new Output(op, tree);
try {