"Fossies" - the Fresh Open Source Software Archive  

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

Code93ReaderTestCase.java  (zxing-zxing-3.4.1):Code93ReaderTestCase.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 Daisuke Makiuchi * @author Daisuke Makiuchi
*/ */
public final class Code93ReaderTestCase extends Assert { public final class Code93ReaderTestCase extends Assert {
@SuppressWarnings("checkstyle:lineLength")
@Test @Test
public void testDecode() throws Exception { public void testDecode() throws FormatException, ChecksumException, NotFoundEx ception {
doTest("Code93!\n$%/+ :\u001b;[{\u007f\u0000@`\u007f\u007f\u007f", doTest("Code93!\n$%/+ :\u001b;[{\u007f\u0000@`\u007f\u007f\u007f",
"00000010101111011010001010011001010010110010011001011001010010011001 01100100101000010101010000101110101101101010001001001101001101001110010101101011 10101101110101110110111010010111010110100111010111011010110101000111011010110001 01011101101010001101011101101010001011011101101011010011011101101011001011011101 10101100110101110110101011011001110110101011001101110110101001101101110110101001 110101001100101101010001010111101111"); "00000010101111011010001010011001010010110010011001011001010010011001 01100100101000010101010000101110101101101010001001001101001101001110010101101011 10101101110101110110111010010111010110100111010111011010110101000111011010110001 01011101101010001101011101101010001011011101101011010011011101101011001011011101 10101100110101110110101011011001110110101011001101110110101001101101110110101001 110101001100101101010001010111101111");
} }
private static void doTest(String expectedResult, String encodedResult) throws private static void doTest(String expectedResult, String encodedResult)
FormatException, ChecksumException, NotFoundException { throws FormatException, ChecksumException, NotFoundException {
Code93Reader sut = new Code93Reader(); Code93Reader sut = new Code93Reader();
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)