"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/test/java/com/google/zxing/oned/Code39ExtendedModeTestCase.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).

Code39ExtendedModeTestCase.java  (zxing-zxing-3.4.1):Code39ExtendedModeTestCase.java  (zxing-zxing-3.5.0)
skipping to change at line 34 skipping to change at line 34
import com.google.zxing.ChecksumException; import com.google.zxing.ChecksumException;
import com.google.zxing.FormatException; import com.google.zxing.FormatException;
import com.google.zxing.NotFoundException; import com.google.zxing.NotFoundException;
import com.google.zxing.Result; import com.google.zxing.Result;
/** /**
* @author Michael Jahn * @author Michael Jahn
*/ */
public final class Code39ExtendedModeTestCase extends Assert { public final class Code39ExtendedModeTestCase extends Assert {
@SuppressWarnings("checkstyle:lineLength")
@Test @Test
public void testDecodeExtendedMode() throws Exception { public void testDecodeExtendedMode() throws FormatException, ChecksumException , NotFoundException {
doTest("\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u00 0e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b \u001c\u001d\u001e\u001f", doTest("\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u00 0e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b \u001c\u001d\u001e\u001f",
"00000100101101101010100100100101100101010110100100100101011010100101 10100100100101010110100101101001001001010110110100101010010010010101010110010110 10010010010101101011001010100100100101010110110010101001001001010101010011011010 01001001010110101001101010010010010101011010011010100100100101010101100110101001 00100101011010101001101001001001010101101010011010010010010101101101010010100100 10010101010110100110100100100101011010110100101001001001010101101101001010010010 01010101010110011010010010010101101010110010100100100101010110101100101001001001 01010101101100101001001001010110010101011010010010010101001101010110100100100101 01100110101010100100100101010010110101101001001001010110010110101010010010010101 00110110101010100100100101101010010110101001001001010110100101101010010010010110 1101001010101001001001010101100101101010010010010110101100101010010110110100000" ); "00000100101101101010100100100101100101010110100100100101011010100101 10100100100101010110100101101001001001010110110100101010010010010101010110010110 10010010010101101011001010100100100101010110110010101001001001010101010011011010 01001001010110101001101010010010010101011010011010100100100101010101100110101001 00100101011010101001101001001001010101101010011010010010010101101101010010100100 10010101010110100110100100100101011010110100101001001001010101101101001010010010 01010101010110011010010010010101101010110010100100100101010110101100101001001001 01010101101100101001001001010110010101011010010010010101001101010110100100100101 01100110101010100100100101010010110101101001001001010110010110101010010010010101 00110110101010100100100101101010010110101001001001010110100101101010010010010110 1101001010101001001001010101100101101010010010010110101100101010010110110100000" );
doTest(" !\"#$%&'()*+,-./0123456789:;<=>?", doTest(" !\"#$%&'()*+,-./0123456789:;<=>?",
"00000100101101101010011010110101001001010010110101001011010010010100 10101101001011010010010100101101101001010100100101001010101100101101001001010010 11010110010101001001010010101101100101010010010100101010100110110100100101001011 01010011010100100101001010110100110101001001010010101011001101010010010100101101 01010011010010010100101011010100110100101011011011001010110101001001010010110101 10100101010011011010110100101011010110010101101101100101010101001101011011010011 01010101100110101010100101101101101001011010101100101101010010010100101001101101 01010100100100101011011001010101001001001010101001101101010010010010110101001101 0101001001001010110100110101010010010010101011001101010010110110100000"); "00000100101101101010011010110101001001010010110101001011010010010100 10101101001011010010010100101101101001010100100101001010101100101101001001010010 11010110010101001001010010101101100101010010010100101010100110110100100101001011 01010011010100100101001010110100110101001001010010101011001101010010010100101101 01010011010010010100101011010100110100101011011011001010110101001001010010110101 10100101010011011010110100101011010110010101101101100101010101001101011011010011 01010101100110101010100101101101101001011010101100101101010010010100101001101101 01010100100100101011011001010101001001001010101001101101010010010010110101001101 0101001001001010110100110101010010010010101011001101010010110110100000");
doTest("@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_", doTest("@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_",
"00001001011011010101001001001010011010101101101010010110101101001011 01101101001010101011001011011010110010101011011001010101010011011011010100110101 01101001101010101100110101101010100110101101010011011011010100101010110100110110 10110100101011011010010101010110011011010101100101011010110010101011011001011001 01010110100110101011011001101010101001011010110110010110101010011011010101010010 01001011010101001101010010010010101101010011010100100100101101101010010101001001 001010101101001101010010010010110101101001010010110110100000"); "00001001011011010101001001001010011010101101101010010110101101001011 01101101001010101011001011011010110010101011011001010101010011011011010100110101 01101001101010101100110101101010100110101101010011011011010100101010110100110110 10110100101011011010010101010110011011010101100101011010110010101011011001011001 01010110100110101011011001101010101001011010110110010110101010011011010101010010 01001011010101001101010010010010101101010011010100100100101101101010010101001001 001010101101001101010010010010110101101001010010110110100000");
doTest("`abcdefghijklmnopqrstuvwxyz{|}~", doTest("`abcdefghijklmnopqrstuvwxyz{|}~",
"00000100101101101010100100100101100110101010100101001001011010100101 10100101001001010110100101101001010010010110110100101010010100100101010110010110 10010100100101101011001010100101001001010110110010101001010010010101010011011010 01010010010110101001101010010100100101011010011010100101001001010101100110101001 01001001011010101001101001010010010101101010011010010100100101101101010010100101 00100101010110100110100101001001011010110100101001010010010101101101001010010100 10010101010110011010010100100101101010110010100101001001010110101100101001010010 01010101101100101001010010010110010101011010010100100101001101010110100101001001 01100110101010100101001001010010110101101001010010010110010110101010010100100101 00110110101010100100100101011011010010101001001001010101011001101010010010010110 1010110010101001001001010110101100101010010010010101011011001010010110110100000" ); "00000100101101101010100100100101100110101010100101001001011010100101 10100101001001010110100101101001010010010110110100101010010100100101010110010110 10010100100101101011001010100101001001010110110010101001010010010101010011011010 01010010010110101001101010010100100101011010011010100101001001010101100110101001 01001001011010101001101001010010010101101010011010010100100101101101010010100101 00100101010110100110100101001001011010110100101001010010010101101101001010010100 10010101010110011010010100100101101010110010100101001001010110101100101001010010 01010101101100101001010010010110010101011010010100100101001101010110100101001001 01100110101010100101001001010010110101101001010010010110010110101010010100100101 00110110101010100100100101011011010010101001001001010101011001101010010010010110 1010110010101001001001010110101100101010010010010101011011001010010110110100000" );
} }
private static void doTest(String expectedResult, String encodedResult) throws private static void doTest(String expectedResult, String encodedResult)
FormatException, ChecksumException, NotFoundException { throws FormatException, ChecksumException, NotFoundException {
Code39Reader sut = new Code39Reader(false, true); Code39Reader sut = new Code39Reader(false, true);
BitMatrix matrix = BitMatrix.parse(encodedResult, "1", "0"); BitMatrix matrix = BitMatrix.parse(encodedResult, "1", "0");
BitArray row = new BitArray(matrix.getWidth()); BitArray row = new BitArray(matrix.getWidth());
matrix.getRow(0, row); matrix.getRow(0, row);
Result result = sut.decodeRow(0, row, null); Result result = sut.decodeRow(0, row, null);
assertEquals(expectedResult, result.getText()); assertEquals(expectedResult, result.getText());
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 4 lines changed or added

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