Clean up the output of tjunittest and TJUnitTest

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.3.x@980 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2013-05-04 23:31:32 +00:00
parent 48f620c4f0
commit 4986652604
2 changed files with 17 additions and 19 deletions

View File

@@ -260,8 +260,8 @@ public class TJUnitTest {
throws Exception {
v = (v < 0) ? v + 256 : v;
if (v < cv - 1 || v > cv + 1) {
throw new Exception("\nComp. " + vname + " at " + row + "," + col +
" should be " + cv + ", not " + v + "\n");
throw new Exception("Comp. " + vname + " at " + row + "," + col +
" should be " + cv + ", not " + v);
}
}
@@ -269,8 +269,8 @@ public class TJUnitTest {
throws Exception {
v = (v < 0) ? v + 256 : v;
if (v > 1) {
throw new Exception("\nComp. " + vname + " at " + row + "," + col +
" should be 0, not " + v + "\n");
throw new Exception("Comp. " + vname + " at " + row + "," + col +
" should be 0, not " + v);
}
}
@@ -278,8 +278,8 @@ public class TJUnitTest {
throws Exception {
v = (v < 0) ? v + 256 : v;
if (v < 254) {
throw new Exception("\nComp. " + vname + " at " + row + "," + col +
" should be 255, not " + v + "\n");
throw new Exception("Comp. " + vname + " at " + row + "," + col +
" should be 255, not " + v);
}
}
@@ -341,12 +341,11 @@ public class TJUnitTest {
}
}
} catch(Exception e) {
System.out.println(e);
System.out.println("\n" + e.getMessage());
retval = 0;
}
if (retval == 0) {
System.out.print("\n");
for (row = 0; row < h; row++) {
for (col = 0; col < w; col++) {
int r = buf[pitch * row + col * ps + roffset];
@@ -420,12 +419,11 @@ public class TJUnitTest {
}
}
} catch(Exception e) {
System.out.println(e);
System.out.println("\n" + e.getMessage());
retval = 0;
}
if (retval == 0) {
System.out.print("\n");
for (row = 0; row < h; row++) {
for (col = 0; col < w; col++) {
int r = (buf[pitch * row + col] >> rshift) & 0xFF;
@@ -485,7 +483,7 @@ public class TJUnitTest {
try {
if (size != correctsize)
throw new Exception("\nIncorrect size " + size + ". Should be " +
throw new Exception("Incorrect size " + size + ". Should be " +
correctsize);
for (row = 0; row < ph; row++) {
@@ -526,7 +524,7 @@ public class TJUnitTest {
}
}
} catch(Exception e) {
System.out.println(e);
System.out.println("\n" + e.getMessage());
retval = 0;
}
@@ -557,7 +555,6 @@ public class TJUnitTest {
}
System.out.print("\n");
}
System.out.print("\n");
}
return retval;
@@ -680,7 +677,7 @@ public class TJUnitTest {
System.out.print("JPEG -> ");
if (yuv == YUVDECODE)
System.out.print("YUV " + subName[subsamp] + " ... ");
System.out.print("YUV " + subNameLong[subsamp] + " ... ");
else {
System.out.print(pfStr + " ");
if (bi)
@@ -760,7 +757,6 @@ public class TJUnitTest {
} else
decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp,
flags, new TJScalingFactor(1, 1));
System.out.print("\n");
}
private static void doTest(int w, int h, int[] formats, int subsamp,
@@ -799,8 +795,10 @@ public class TJUnitTest {
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi)
decompTest(tjd, dstBuf, size, w, h, pf + (TJ.PF_RGBA - TJ.PF_RGBX),
baseName, subsamp, flags);
System.out.print("\n");
}
}
System.out.print("--------------------\n\n");
} catch(Exception e) {
if (tjc != null) tjc.close();
if (tjd != null) tjd.close();