Add new matrix tests in RGBLuminanceSourceTestCase (#757)

This commit is contained in:
David Sanders 2017-02-20 06:58:12 -07:00 committed by Sean Owen
parent 25776d82d9
commit 0ec5b9a260

View file

@ -39,6 +39,12 @@ public final class RGBLuminanceSourceTestCase extends Assert {
public void testMatrix() {
assertArrayEquals(new byte[] { 0x00, 0x7F, (byte) 0xFF, 0x3F, 0x7F, 0x3F, 0x3F, 0x7F, 0x3F },
SOURCE.getMatrix());
LuminanceSource croppedFullWidth = SOURCE.crop(0, 1, 3, 2);
assertArrayEquals(new byte[] { 0x3F, 0x7F, 0x3F, 0x3F, 0x7F, 0x3F },
croppedFullWidth.getMatrix());
LuminanceSource croppedCorner = SOURCE.crop(1, 1, 2, 2);
assertArrayEquals(new byte[] { 0x7F, 0x3F, 0x7F, 0x3F },
croppedCorner.getMatrix());
}
@Test