gwlucastrig commented on a change in pull request #179:
URL: https://github.com/apache/commons-imaging/pull/179#discussion_r734100614
##########
File path:
src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterDataTest.java
##########
@@ -84,6 +85,45 @@ public void testGetValue() {
}
}
+ /**
+ * Test of setValue method, of class TiffRasterData.
+ */
+ @Test
+ public void testSetValue2() {
+ final TiffRasterData instance = new TiffRasterDataFloat(width, height,
2);
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ final int index = y * width + height;
+ instance.setValue(x, y, 1, index);
+ final int test = (int) instance.getValue(x, y, 1);
+ assertEquals(index, test, "Set/get value test failed at (" + x
+ "," + y + ")");
+ instance.setIntValue(x, y, 1, index);
+ final int iTest = instance.getIntValue(x, y, 1);
+ assertEquals(index, iTest, "Get/set value test failed at (" +
x + "," + y + ")");
+ }
+ }
+ }
+
+ /**
+ * Test of getValue method, of class TiffRasterData.
+ */
+ @Test
+ public void testGetValue2() {
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ final int index = y * width + x;
+ final int test = (int) raster.getValue(x, y, 0);
+ assertEquals(index, test, "Get into source data test failed at
(" + x + "," + y + ")");
+ final int iTest = raster.getIntValue(x, y, 0);
+ assertEquals(index, iTest, "Get into source data test failed
at (" + x + "," + y + ")");
+ }
+ }
+ }
+
+
+
+
+
Review comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]