mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Add new matrix tests in RGBLuminanceSourceTestCase (#757)
This commit is contained in:
parent
25776d82d9
commit
0ec5b9a260
|
@ -39,6 +39,12 @@ public final class RGBLuminanceSourceTestCase extends Assert {
|
||||||
public void testMatrix() {
|
public void testMatrix() {
|
||||||
assertArrayEquals(new byte[] { 0x00, 0x7F, (byte) 0xFF, 0x3F, 0x7F, 0x3F, 0x3F, 0x7F, 0x3F },
|
assertArrayEquals(new byte[] { 0x00, 0x7F, (byte) 0xFF, 0x3F, 0x7F, 0x3F, 0x3F, 0x7F, 0x3F },
|
||||||
SOURCE.getMatrix());
|
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
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue