diff options
| author | Anders Hammarquist <iko@iko.pp.se> | 2021-09-28 23:28:07 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-28 23:28:07 +0300 |
| commit | fc50fca12f12c44867b1aa07f8a2f7d328a2fd03 (patch) | |
| tree | c1a9ebbcee157d035b467cbfce4f858d41633d06 /core/src/test/java | |
| parent | 83650ce341732b5835c08411c8629a94a0fab082 (diff) | |
| download | zxing-fc50fca12f12c44867b1aa07f8a2f7d328a2fd03.tar.xz | |
Fix decoding of FNC1 in AztecCode. (#1441)
* Fix decoding of FNC1 in AztecCode. Flush buffer to make sure FNC1 is output in the correct
position in the stream.
* Simplify. Flush buffers outside switch, as it happens for all non-error cases anyway.
Diffstat (limited to 'core/src/test/java')
| -rw-r--r-- | core/src/test/java/com/google/zxing/aztec/decoder/DecoderTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/test/java/com/google/zxing/aztec/decoder/DecoderTest.java b/core/src/test/java/com/google/zxing/aztec/decoder/DecoderTest.java index 377d19636..2e3872f42 100644 --- a/core/src/test/java/com/google/zxing/aztec/decoder/DecoderTest.java +++ b/core/src/test/java/com/google/zxing/aztec/decoder/DecoderTest.java @@ -50,6 +50,11 @@ public final class DecoderTest extends Assert { testHighLevelDecodeString("±Ça", // B/S 1 0xb1 P/S FLG(n) 2 '2' '6' B/S 2 0xc3 0x87 L/L 'a' "XXXXX ....X X.XX...X ..... ..... .X. .X.. X... XXXXX ...X. XX....XX X....XXX XXX.. ...X."); + + // GS1 data + testHighLevelDecodeString("101233742", + // P/S FLG(n) 0 D/L 1 0 1 2 3 P/S FLG(n) 0 3 7 4 2 + "..... ..... ... XXXX. ..XX ..X. ..XX .X.. .X.X .... ..... ... .X.X X..X .XX. .X.."); } private static void testHighLevelDecodeString(String expectedString, String b) throws FormatException { |
