"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/test/java/com/google/zxing/oned/EAN13WriterTestCase.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

EAN13WriterTestCase.java  (zxing-zxing-3.4.1):EAN13WriterTestCase.java  (zxing-zxing-3.5.0)
skipping to change at line 32 skipping to change at line 32
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
/** /**
* @author Ari Pollak * @author Ari Pollak
*/ */
public final class EAN13WriterTestCase extends Assert { public final class EAN13WriterTestCase extends Assert {
@Test @Test
public void testEncode() { public void testEncode() {
String testStr = "0000101000101101001110110011001001101111010011101010101100 String testStr =
1101101100100001010111001001110100010010100000"; "00001010001011010011101100110010011011110100111010101011001101101100100
001010111001001110100010010100000";
BitMatrix result = new EAN13Writer().encode("5901234123457", BarcodeFormat.E AN_13, testStr.length(), 0); BitMatrix result = new EAN13Writer().encode("5901234123457", BarcodeFormat.E AN_13, testStr.length(), 0);
assertEquals(testStr, BitMatrixTestCase.matrixToString(result)); assertEquals(testStr, BitMatrixTestCase.matrixToString(result));
} }
@Test @Test
public void testAddChecksumAndEncode() { public void testAddChecksumAndEncode() {
String testStr = "0000101000101101001110110011001001101111010011101010101100 String testStr =
1101101100100001010111001001110100010010100000"; "00001010001011010011101100110010011011110100111010101011001101101100100
001010111001001110100010010100000";
BitMatrix result = new EAN13Writer().encode("590123412345", BarcodeFormat.EA N_13, testStr.length(), 0); BitMatrix result = new EAN13Writer().encode("590123412345", BarcodeFormat.EA N_13, testStr.length(), 0);
assertEquals(testStr, BitMatrixTestCase.matrixToString(result)); assertEquals(testStr, BitMatrixTestCase.matrixToString(result));
} }
@Test(expected = IllegalArgumentException.class) @Test(expected = IllegalArgumentException.class)
public void testEncodeIllegalCharacters() { public void testEncodeIllegalCharacters() {
new EAN13Writer().encode("5901234123abc", BarcodeFormat.EAN_13, 0, 0); new EAN13Writer().encode("5901234123abc", BarcodeFormat.EAN_13, 0, 0);
} }
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)