From fc50fca12f12c44867b1aa07f8a2f7d328a2fd03 Mon Sep 17 00:00:00 2001 From: Anders Hammarquist Date: Tue, 28 Sep 2021 22:28:07 +0200 Subject: 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. --- core/src/test/java/com/google/zxing/aztec/decoder/DecoderTest.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/src/test/java') 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 { -- cgit v1.2.3