mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Merge pull request #6 from ftiercelin/ISS1761
Reinstate testEncodeAuto UT
This commit is contained in:
commit
631f6c55e3
|
@ -35,6 +35,12 @@ import org.junit.Test;
|
||||||
* Tests {@link PDF417HighLevelEncoder}.
|
* Tests {@link PDF417HighLevelEncoder}.
|
||||||
*/
|
*/
|
||||||
public final class PDF417EncoderTestCase extends Assert {
|
public final class PDF417EncoderTestCase extends Assert {
|
||||||
|
private static final String PDF417PFX = "\u039f\u001A\u0385";
|
||||||
|
@Test
|
||||||
|
public void testEncodeAuto() throws Exception {
|
||||||
|
String input = "ABCD";
|
||||||
|
assertEquals(PDF417PFX + input, checkEncodeAutoWithSpecialChars(input, Compaction.AUTO));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEncodeAutoWithSpecialChars() throws Exception {
|
public void testEncodeAutoWithSpecialChars() throws Exception {
|
||||||
|
@ -98,8 +104,8 @@ public final class PDF417EncoderTestCase extends Assert {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void checkEncodeAutoWithSpecialChars(String input, Compaction compaction) throws Exception {
|
public String checkEncodeAutoWithSpecialChars(String input, Compaction compaction) throws Exception {
|
||||||
PDF417HighLevelEncoder.encodeHighLevel(input, compaction, StandardCharsets.UTF_8, false);
|
return PDF417HighLevelEncoder.encodeHighLevel(input, compaction, StandardCharsets.UTF_8, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue