"Fossies" - the Fresh Open Source Software Archive  

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

PDF417EncoderTestCase.java  (zxing-zxing-3.4.1):PDF417EncoderTestCase.java  (zxing-zxing-3.5.0)
skipping to change at line 32 skipping to change at line 32
import org.junit.Test; import org.junit.Test;
/** /**
* Tests {@link PDF417HighLevelEncoder}. * Tests {@link PDF417HighLevelEncoder}.
*/ */
public final class PDF417EncoderTestCase extends Assert { public final class PDF417EncoderTestCase extends Assert {
@Test @Test
public void testEncodeAuto() throws Exception { public void testEncodeAuto() throws Exception {
String encoded = PDF417HighLevelEncoder.encodeHighLevel( String encoded = PDF417HighLevelEncoder.encodeHighLevel(
"ABCD", Compaction.AUTO, StandardCharsets.UTF_8); "ABCD", Compaction.AUTO, StandardCharsets.UTF_8, false);
assertEquals("\u039f\u001A\u0385ABCD", encoded); assertEquals("\u039f\u001A\u0385ABCD", encoded);
} }
@Test @Test
public void testEncodeAutoWithSpecialChars() throws Exception { public void testEncodeAutoWithSpecialChars() throws Exception {
// Just check if this does not throw an exception // Just check if this does not throw an exception
PDF417HighLevelEncoder.encodeHighLevel( PDF417HighLevelEncoder.encodeHighLevel(
"1%§s ?aG$", Compaction.AUTO, StandardCharsets.UTF_8); "1%§s ?aG$", Compaction.AUTO, StandardCharsets.UTF_8, false);
} }
@Test @Test
public void testEncodeIso88591WithSpecialChars() throws Exception { public void testEncodeIso88591WithSpecialChars() throws Exception {
// Just check if this does not throw an exception // Just check if this does not throw an exception
PDF417HighLevelEncoder.encodeHighLevel("asdfg§asd", Compaction.AUTO, Standar dCharsets.ISO_8859_1); PDF417HighLevelEncoder.encodeHighLevel("asdfg§asd", Compaction.AUTO, Standar dCharsets.ISO_8859_1, false);
} }
@Test @Test
public void testEncodeText() throws Exception { public void testEncodeText() throws Exception {
String encoded = PDF417HighLevelEncoder.encodeHighLevel( String encoded = PDF417HighLevelEncoder.encodeHighLevel(
"ABCD", Compaction.TEXT, StandardCharsets.UTF_8); "ABCD", Compaction.TEXT, StandardCharsets.UTF_8, false);
assertEquals("Ο\u001A\u0001?", encoded); assertEquals("Ο\u001A\u0001?", encoded);
} }
@Test @Test
public void testEncodeNumeric() throws Exception { public void testEncodeNumeric() throws Exception {
String encoded = PDF417HighLevelEncoder.encodeHighLevel( String encoded = PDF417HighLevelEncoder.encodeHighLevel(
"1234", Compaction.NUMERIC, StandardCharsets.UTF_8); "1234", Compaction.NUMERIC, StandardCharsets.UTF_8, false);
assertEquals("\u039f\u001A\u0386\f\u01b2", encoded); assertEquals("\u039f\u001A\u0386\f\u01b2", encoded);
} }
@Test @Test
public void testEncodeByte() throws Exception { public void testEncodeByte() throws Exception {
String encoded = PDF417HighLevelEncoder.encodeHighLevel( String encoded = PDF417HighLevelEncoder.encodeHighLevel(
"abcd", Compaction.BYTE, StandardCharsets.UTF_8); "abcd", Compaction.BYTE, StandardCharsets.UTF_8, false);
assertEquals("\u039f\u001A\u0385abcd", encoded); assertEquals("\u039f\u001A\u0385abcd", encoded);
} }
} }
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added

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