Skip to content

Commit

Permalink
Fix test for file with multiple images.
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Apr 4, 2011
1 parent 3bd3141 commit f148853
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/test-suite/src/loci/tests/testng/TiffWriterTest.java
Expand Up @@ -243,7 +243,7 @@ private void assertUnevenTiles(String output, String compression,
blockWidth = sizeX;
n = 1;
}
if (m == 1) {
if (m == 0) {
blockHeight = sizeY;
m = 1;
}
Expand All @@ -257,8 +257,8 @@ private void assertUnevenTiles(String output, String compression,
for (int k = 0; k < count; k++) {
x = 0;
y = 0;
md5PerImage = new HashMap<Integer, String>();
v = s*series+k;
md5PerImage = new HashMap<Integer, String>();
md5ImageInSeries.put(v, md5PerImage);
ifd = new IFD();
ifd.put(IFD.TILE_WIDTH, blockWidth);
Expand Down Expand Up @@ -331,7 +331,7 @@ private void assertUnevenTiles(String output, String compression,
x = blockWidth*j;
w = blockWidth;
}
tile = outputReader.openBytes(0, x, y, w, h);
tile = outputReader.openBytes(k, x, y, w, h);
planeDigest = results.get(index);
tileDigest = TestTools.md5(tile);
if (!planeDigest.equals(tileDigest)) {
Expand All @@ -349,7 +349,7 @@ private void assertUnevenTiles(String output, String compression,

@Parameters({"id"})
@BeforeClass
public void parse(String id) throws Exception {
public void parse( String id) throws Exception {
ServiceFactory factory = new ServiceFactory();
service = factory.getInstance(OMEXMLService.class);
metadata = service.createOMEXMLMetadata();
Expand Down Expand Up @@ -449,7 +449,7 @@ public void testWriteUnevenTilesImage256x256Block() throws Exception {
File f;
for (int i = 0; i < COMPRESSION.length; i++) {
for (int j = 0; j < BIG_TIFF.length; j++) {
f = File.createTempFile("testWriteFullImage_"+j+"_"+
f = File.createTempFile("testWriteUnevenTilesImage256x256Block_"+j+"_"+
COMPRESSION[i], ".tiff");
assertUnevenTiles(f.getAbsolutePath(), COMPRESSION[i], 256, 256,
BIG_TIFF[j]);
Expand Down

0 comments on commit f148853

Please sign in to comment.