mirror of
https://git.code.sf.net/p/zint/code
synced 2025-06-02 16:09:51 -04:00
AZTEC: fix bit-stuffing; AZTECRUNE: fix >= 128; DATAMATRIX: eod shift -> 0 pad; Qt6
This commit is contained in:
parent
90012ab23f
commit
943ba79866
53 changed files with 2324 additions and 913 deletions
|
@ -186,7 +186,7 @@ static void test_input(int index, int generate, int debug) {
|
|||
char *comment;
|
||||
};
|
||||
// é U+00E9 (\351, 233), UTF-8 C3A9
|
||||
// β U+03B2 in ISO 8859-7 Greek (but not other ISO 8859 or Win page), in Shift JIS 0x83C0, UTF-8 CEB2
|
||||
// β U+03B2 in ISO 8859-7 Greek (but not other ISO 8859 or Win page) (\342, 226), UTF-8 CEB2
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_PDF417, UNICODE_MODE, -1, "é", 0, 0, 6, 103, "(12) 4 913 233 900 398 878 279 350 217 295 231 77", "" },
|
||||
/* 1*/ { BARCODE_PDF417, UNICODE_MODE, 3, "é", 0, 3, 7, 103, "(14) 6 927 3 913 233 900 162 81 551 529 607 384 164 108", "" },
|
||||
|
@ -261,6 +261,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
int ret;
|
||||
struct item {
|
||||
int symbology;
|
||||
int eci;
|
||||
int input_mode;
|
||||
int option_1;
|
||||
int option_2;
|
||||
|
@ -274,7 +275,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
char *expected;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_PDF417, UNICODE_MODE, 1, 2, "PDF417 Symbology Standard", 0, 10, 103, 0, "ISO 15438:2015 Figure 1, same, BWIPP uses different encodation, same codeword count",
|
||||
/* 0*/ { BARCODE_PDF417, -1, UNICODE_MODE, 1, 2, "PDF417 Symbology Standard", 0, 10, 103, 0, "ISO 15438:2015 Figure 1, same, BWIPP uses different encodation, same codeword count",
|
||||
"1111111101010100011101010011100000111010110011110001110111011001100011110101011110000111111101000101001"
|
||||
"1111111101010100011111010100110000110100001110001001111010001010000011111010100110000111111101000101001"
|
||||
"1111111101010100011101010111111000101100110111100001110111111000101011010100111110000111111101000101001"
|
||||
|
@ -286,14 +287,14 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1111111101010100011010011011111100110000101001111101101111100010001010100110011111000111111101000101001"
|
||||
"1111111101010100010100011000001100100010111101111001100011100011001011010001100011100111111101000101001"
|
||||
},
|
||||
/* 1*/ { BARCODE_PDF417, UNICODE_MODE, 1, 2, "PDF417", 0, 5, 103, 1, "ISO 15438:2015 Annex Q example for generating ECC",
|
||||
/* 1*/ { BARCODE_PDF417, -1, UNICODE_MODE, 1, 2, "PDF417", 0, 5, 103, 1, "ISO 15438:2015 Annex Q example for generating ECC",
|
||||
"1111111101010100011110101011110000110101000110000001110111011001100011110101011110000111111101000101001"
|
||||
"1111111101010100011111101010011100110100001110001001111010001010000011111101010111000111111101000101001"
|
||||
"1111111101010100011101010111111000101100110011110001100011111001001011101010011111100111111101000101001"
|
||||
"1111111101010100010101111001111000101011101110000001100001101000100010101111001111000111111101000101001"
|
||||
"1111111101010100011101011100011000100001101011111101111110110001011011101011100110000111111101000101001"
|
||||
},
|
||||
/* 2*/ { BARCODE_PDF417, UNICODE_MODE, 0, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ ", 0, 17, 86, 1, "Text Compaction Alpha",
|
||||
/* 2*/ { BARCODE_PDF417, -1, UNICODE_MODE, 0, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ ", 0, 17, 86, 1, "Text Compaction Alpha",
|
||||
"11111111010101000111110101001111101101011001110000011101010111000000111111101000101001"
|
||||
"11111111010101000111111010101110001111110101011100011110101000100000111111101000101001"
|
||||
"11111111010101000110101011111000001010011001111100011101010111111000111111101000101001"
|
||||
|
@ -312,7 +313,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"11111111010101000110010110111000001100011000100001011100101000111000111111101000101001"
|
||||
"11111111010101000101000111100100001110000101100010010100011110000100111111101000101001"
|
||||
},
|
||||
/* 3*/ { BARCODE_PDF417, UNICODE_MODE, 1, 1, "abcdefghijklmnopqrstuvwxyz ", 0, 19, 86, 1, "Text Compaction Lower",
|
||||
/* 3*/ { BARCODE_PDF417, -1, UNICODE_MODE, 1, 1, "abcdefghijklmnopqrstuvwxyz ", 0, 19, 86, 1, "Text Compaction Lower",
|
||||
"11111111010101000110101000110000001101011001110000011101010111000000111111101000101001"
|
||||
"11111111010101000111110101001100001100000101110010011111010100011000111111101000101001"
|
||||
"11111111010101000110101011111000001111101011110110011010100111110000111111101000101001"
|
||||
|
@ -333,14 +334,14 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"11111111010101000111111001011101101010000001001111010010111001111110111111101000101001"
|
||||
"11111111010101000111011010000110001000100111001110011110110100111000111111101000101001"
|
||||
},
|
||||
/* 4*/ { BARCODE_PDF417, UNICODE_MODE, 1, 4, "0123456&\015\011,:#-.$/+%*=^ 789", 0, 5, 137, 1, "Text Compaction Mixed",
|
||||
/* 4*/ { BARCODE_PDF417, -1, UNICODE_MODE, 1, 4, "0123456&\015\011,:#-.$/+%*=^ 789", 0, 5, 137, 1, "Text Compaction Mixed",
|
||||
"11111111010101000111101010111100001110101100111100010000110111001100110101111001111101010001110111000011101010011100000111111101000101001"
|
||||
"11111111010101000111111010100111001010001111000001011101101111001100110110011110010001110010000011010011111101010111000111111101000101001"
|
||||
"11111111010101000110101001111100001100111010000111011011110010110000100000101011110001101111101010000011101010011111100111111101000101001"
|
||||
"11111111010101000101011110011110001000010000100001010010011000011000110010000100110001000011000110010010101111101111100111111101000101001"
|
||||
"11111111010101000111010111000110001001111001001111010000101111101100100011110010111101001111110110111011101011100110000111111101000101001"
|
||||
},
|
||||
/* 5*/ { BARCODE_PDF417, UNICODE_MODE, 3, 2, ";<>@[\\]_'~!\015\011,:\012-.$/\"|*()?{", 0, 16, 103, 1, "Text Compaction Punctuation",
|
||||
/* 5*/ { BARCODE_PDF417, -1, UNICODE_MODE, 3, 2, ";<>@[\\]_'~!\015\011,:\012-.$/\"|*()?{", 0, 16, 103, 1, "Text Compaction Punctuation",
|
||||
"1111111101010100011111010100111110111010110011110001000111011100100011110101011110000111111101000101001"
|
||||
"1111111101010100011111010100001100111111010101110001101011111101111011110101000100000111111101000101001"
|
||||
"1111111101010100011101010111111000101000001000111101011011001111000011010100001111100111111101000101001"
|
||||
|
@ -358,26 +359,26 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1111111101010100011101000011111010111111010001101001011000010011100010010101111000000111111101000101001"
|
||||
"1111111101010100011001011011100000110011001100001101100100101100000011110010100011110111111101000101001"
|
||||
},
|
||||
/* 6*/ { BARCODE_PDF417, UNICODE_MODE, 2, 3, "12345678901234", 0, 5, 120, 1, "Numeric Compaction",
|
||||
/* 6*/ { BARCODE_PDF417, -1, UNICODE_MODE, 2, 3, "12345678901234", 0, 5, 120, 1, "Numeric Compaction",
|
||||
"111111110101010001111010101111000011101010001110000100111101111010001001011100001110011111010101111100111111101000101001"
|
||||
"111111110101010001111110101000111011010000001110010111111011010011001111010100000010011111101010111000111111101000101001"
|
||||
"111111110101010001010100111100000010111000110011100101110011000011101110001111110101011101010001111110111111101000101001"
|
||||
"111111110101010001010111100111100010001100001100010100001100011101101110101100111100011010111100111110111111101000101001"
|
||||
"111111110101010001110101110000110011000000101110010110001001110000101011001000111111011101011100110000111111101000101001"
|
||||
},
|
||||
/* 7*/ { BARCODE_PDF417, UNICODE_MODE, 1, 4, "\177\177\177\177\177\177\177\177\177\177\177", 0, 4, 137, 1, "Byte Compaction",
|
||||
/* 7*/ { BARCODE_PDF417, -1, UNICODE_MODE, 1, 4, "\177\177\177\177\177\177\177\177\177\177\177", 0, 4, 137, 1, "Byte Compaction",
|
||||
"11111111010101000111101010111100001101011011100000010000010000100010111001001100111101000010100001000011101010011100000111111101000101001"
|
||||
"11111111010101000111110101001100001110010000111011010100111110000110111101001100001101111101000100011011111101010111000111111101000101001"
|
||||
"11111111010101000110101001111100001010000001011110010100000010111100101000000101111001010000001011110011010100111110000111111101000101001"
|
||||
"11111111010101000101011110011110001010001000001000011011000010100000111000110001001101100111000110010010101111101111100111111101000101001"
|
||||
},
|
||||
/* 8*/ { BARCODE_PDF417, UNICODE_MODE, 1, 4, "\177\177\177\177\177\177\177\177\177\177\177\177", 0, 4, 137, 1, "Byte Compaction, mod 6 == 0 (924 emitted)",
|
||||
/* 8*/ { BARCODE_PDF417, -1, UNICODE_MODE, 1, 4, "\177\177\177\177\177\177\177\177\177\177\177\177", 0, 4, 137, 1, "Byte Compaction, mod 6 == 0 (924 emitted)",
|
||||
"11111111010101000111101010111100001101011011100000011000111000110100111001001100111101000010100001000011101010011100000111111101000101001"
|
||||
"11111111010101000111110101001100001110010000111011010100111110000110111101001100001101111001010010000011111101010111000111111101000101001"
|
||||
"11111111010101000110101001111100001001110000100110010011000100001110101000011001111101101000101111100011010100111110000111111101000101001"
|
||||
"11111111010101000101011110011110001101000100011000010011000111001100110001100001000101110100010111000010101111101111100111111101000101001"
|
||||
},
|
||||
/* 9*/ { BARCODE_PDF417, UNICODE_MODE, -1, 5, "ABCDEF1234567890123\177\177\177\177VWXYZ", 0, 6, 154, 1, "Text, Numeric, Byte, Text",
|
||||
/* 9*/ { BARCODE_PDF417, -1, UNICODE_MODE, -1, 5, "ABCDEF1234567890123\177\177\177\177VWXYZ", 0, 6, 154, 1, "Text, Numeric, Byte, Text",
|
||||
"1111111101010100011110101011110000110101110111100001111010101111000010100111001110000110100000101100001001111011110100011110101001111000111111101000101001"
|
||||
"1111111101010100011110101000010000111101011001100001010011110000100011111100011101010110000010111000101111001011011000011111101010111000111111101000101001"
|
||||
"1111111101010100011101010011111100110011111101100101010000001011110010100000010111100101000000101111001010000001011110010101000011110000111111101000101001"
|
||||
|
@ -385,7 +386,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1111111101010100011010111000001000101111110101100001011111101011000011001011111001110111100100100100001011111101011000011101011100110000111111101000101001"
|
||||
"1111111101010100011111010111100110110111110110011001101001011111000010101110011111100100100001000111101011000000101110011110101111101100111111101000101001"
|
||||
},
|
||||
/* 10*/ { BARCODE_PDF417COMP, UNICODE_MODE, 1, 2, "PDF417 APK", 0, 6, 69, 0, "ISO 15438:2015 Figure G.1, same, BWIPP uses different encodation, same codeword count",
|
||||
/* 10*/ { BARCODE_PDF417COMP, -1, UNICODE_MODE, 1, 2, "PDF417 APK", 0, 6, 69, 0, "ISO 15438:2015 Figure G.1, same, BWIPP uses different encodation, same codeword count",
|
||||
"111111110101010001111010101111000011010100001100000111011101100110001"
|
||||
"111111110101010001111010100010000011010000111000100111101000101000001"
|
||||
"111111110101010001110101011111100010110011011110000100111110011000101"
|
||||
|
@ -393,7 +394,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"111111110101010001111010111000111011011000001111010110010011101000001"
|
||||
"111111110101010001111010111101000011110100111101000110010010011111001"
|
||||
},
|
||||
/* 11*/ { BARCODE_PDF417COMP, UNICODE_MODE, 4, 4, "ABCDEFG", 0, 10, 103, 1, "",
|
||||
/* 11*/ { BARCODE_PDF417COMP, -1, UNICODE_MODE, 4, 4, "ABCDEFG", 0, 10, 103, 1, "",
|
||||
"1111111101010100011101010011100000110101000011000001111010101111000010100111001110000110100000101100001"
|
||||
"1111111101010100011110101000000100110100000011100101011111101011000010111111010110000101111110101100001"
|
||||
"1111111101010100011010100111110000101111001100011001000001111010100010011111001100100111001011111001001"
|
||||
|
@ -405,7 +406,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1111111101010100010100110011111000100110000110111101100111000010111010010001011110000110011111010001001"
|
||||
"1111111101010100010100011000001100110001101010000001100011000110011011001001101110000111110111110101001"
|
||||
},
|
||||
/* 12*/ { BARCODE_HIBC_PDF, UNICODE_MODE, -1, 3, "H123ABC01234567890D", 0, 8, 120, 0, "BWIPP uses different encodation, same codeword count but zint half-pad shorter",
|
||||
/* 12*/ { BARCODE_HIBC_PDF, -1, UNICODE_MODE, -1, 3, "H123ABC01234567890D", 0, 8, 120, 0, "BWIPP uses different encodation, same codeword count but zint half-pad shorter",
|
||||
"111111110101010001111101010111110011101011001111000100000100010010001110001110100010011111010101111100111111101000101001"
|
||||
"111111110101010001111110101000111011110000010001010110101111110111101111100011101101011110101001000000111111101000101001"
|
||||
"111111110101010001010100111100000011111010111101100100001111000101001100101000011111011101010001111110111111101000101001"
|
||||
|
@ -415,7 +416,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"111111110101010001110100111011111010100110001100000110100011100111101111010010111100011101001110111110111111101000101001"
|
||||
"111111110101010001111101001011000011100001001100100111010000011001001111011000110100010101111110111000111111101000101001"
|
||||
},
|
||||
/* 13*/ { BARCODE_HIBC_PDF, UNICODE_MODE, 1, 3, "A123BJC5D6E71", 0, 6, 120, 1, "BWIPP example",
|
||||
/* 13*/ { BARCODE_HIBC_PDF, -1, UNICODE_MODE, 1, 3, "A123BJC5D6E71", 0, 6, 120, 1, "BWIPP example",
|
||||
"111111110101010001111010101111000011110101101111100100000100010010001000011011100110011111010101111100111111101000101001"
|
||||
"111111110101010001111010100010000011110000010001010110101111110111101111000001000101011111101010111000111111101000101001"
|
||||
"111111110101010001010100111100000010110001100011110101111110111101101000111100011011010101000111100000111111101000101001"
|
||||
|
@ -423,7 +424,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"111111110101010001111010111000111011010111110011100110100000011100101111110101000111011101011100110000111111101000101001"
|
||||
"111111110101010001111101011110110010011100110011100100011110110011001011001011100000011110101111000100111111101000101001"
|
||||
},
|
||||
/* 14*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 1, "ABCDEFGHIJKLMNOPQRSTUV", 0, 20, 38, 1, "ISO 24728:2006 Figure 1 1st 1x20, same",
|
||||
/* 14*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 1, "ABCDEFGHIJKLMNOPQRSTUV", 0, 20, 38, 1, "ISO 24728:2006 Figure 1 1st 1x20, same",
|
||||
"11110101001000011000110010011110101001"
|
||||
"11100101001111110101011100011100101001"
|
||||
"11101101001010011001111100011101101001"
|
||||
|
@ -445,7 +446,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"11011101001111011111011010011011101001"
|
||||
"11011001001100010001110100011011001001"
|
||||
},
|
||||
/* 15*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 2, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD", 0, 20, 55, 1, "ISO 24728:2006 Figure 1 2nd 2x20, same",
|
||||
/* 15*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 2, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCD", 0, 20, 55, 1, "ISO 24728:2006 Figure 1 2nd 2x20, same",
|
||||
"1111010100100001100011001001111010101111000011110101001"
|
||||
"1110010100110101111110111101111101000100110011100101001"
|
||||
"1110110100101101100111100001011001110011111011101101001"
|
||||
|
@ -467,7 +468,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1101110100111010110011110001000001001101100011011101001"
|
||||
"1101100100111100110110100001001001111001000011011001001"
|
||||
},
|
||||
/* 16*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 3, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN", 0, 20, 82, 1, "ISO 24728:2006 Figure 1 3rd 3x20",
|
||||
/* 16*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 3, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN", 0, 20, 82, 1, "ISO 24728:2006 Figure 1 3rd 3x20",
|
||||
"1100100010100001100011001001011110010111101010111100001010011100111000011100101101"
|
||||
"1110100010111110100010011001011110110101000011111001101001011110010000011000101101"
|
||||
"1110110010111100010111101001001110110110111011001111001001100001000111011000101001"
|
||||
|
@ -489,7 +490,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1111010100101111011110100001011001000111110011010111101011110111110110011010000101"
|
||||
"1110010100110010001111011001011001100111000010111011001110001011100110011011000101"
|
||||
},
|
||||
/* 17*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB", 0, 20, 99, 1, "ISO 24728:2006 Figure 1 4th 4x20, same",
|
||||
/* 17*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 4, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZAB", 0, 20, 99, 1, "ISO 24728:2006 Figure 1 4th 4x20, same",
|
||||
"110010001010000110001100100111101010111100001011110010101001110011100001101000001011000011100101101"
|
||||
"111010001010100001111100110100101111001000001011110110111011011110011001101100111100100011000101101"
|
||||
"111011001010011000010001110110011101000011101001110110110111100101100001000001010111100011000101001"
|
||||
|
@ -511,7 +512,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"111101010011100011101010000110001011101111001011001000111110111101011001100101110111100011010000101"
|
||||
"111001010010001000001111010111100010100001001011001100100111101101111101001110100111110011011000101"
|
||||
},
|
||||
/* 18*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 1, "123456789012345", 0, 14, 38, 1, "Number Compaction",
|
||||
/* 18*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 1, "123456789012345", 0, 14, 38, 1, "Number Compaction",
|
||||
"11101110101011111101001100011101110101"
|
||||
"11100110101110101011111100011100110101"
|
||||
"11110110101000001011001100011110110101"
|
||||
|
@ -527,7 +528,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"11100101001101011110000110011100101001"
|
||||
"11101101001101000111111001011101101001"
|
||||
},
|
||||
/* 19*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 2, "\177\177\177", 0, 8, 55, 1, "Byte Compaction",
|
||||
/* 19*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 2, "\177\177\177", 0, 8, 55, 1, "Byte Compaction",
|
||||
"1100100010100000100001000101010000010010000011001000101"
|
||||
"1110100010111110100010001101111101000100011011101000101"
|
||||
"1110110010110001111100100101100011111001001011101100101"
|
||||
|
@ -537,7 +538,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1100111010111001111001100101000001001101100011001110101"
|
||||
"1110111010111000101111011101110001000011010011101110101"
|
||||
},
|
||||
/* 20*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 2, "\177\177\177\177\177\177", 0, 8, 55, 1, "Byte Compaction, mod 6 == 0 (924 emitted)",
|
||||
/* 20*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 2, "\177\177\177\177\177\177", 0, 8, 55, 1, "Byte Compaction, mod 6 == 0 (924 emitted)",
|
||||
"1100100010110001110001101001110010011001111011001000101"
|
||||
"1110100010100010001111010001110010000111011011101000101"
|
||||
"1110110010101000011001111101101000101111100011101100101"
|
||||
|
@ -547,7 +548,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1100111010100100010000100001110111101100001011001110101"
|
||||
"1110111010111110011010100001101100001111010011101110101"
|
||||
},
|
||||
/* 21*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 3, "ABCDEFG\177\177\177", 0, 8, 82, 1, "Text & Byte Compaction",
|
||||
/* 21*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 3, "ABCDEFG\177\177\177", 0, 8, 82, 1, "Text & Byte Compaction",
|
||||
"1100111010100001100011001001000010110111101010111100001010011100111000011001110101"
|
||||
"1110111010111110100010011001000010010110100000011100101101111110101110011101110101"
|
||||
"1110011010101000000101111001000011010101000000101111001010000001011110011100110101"
|
||||
|
@ -557,7 +558,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"1100001010111110111010111001001100010110011100011000101101100001100110011000010101"
|
||||
"1100011010110100011100001001001110010110110000111101001100011011110010011000110101"
|
||||
},
|
||||
/* 22*/ { BARCODE_MICROPDF417, UNICODE_MODE, -1, 4, "\177\177\177abcdefgh1234567890123", 0, 8, 99, 1, "Byte & Text & Numeric Compaction",
|
||||
/* 22*/ { BARCODE_MICROPDF417, -1, UNICODE_MODE, -1, 4, "\177\177\177abcdefgh1234567890123", 0, 8, 99, 1, "Byte & Text & Numeric Compaction",
|
||||
"110011101010000010000100010101000001001000001000010110101000001001000001010000010010000011001110101"
|
||||
"111011101010111111010110000110000010111001001000010010111101011100111001110100111001100011101110101"
|
||||
"111001101011111001011110110101100110011110001000011010100001111000101001111110101100010011100110101"
|
||||
|
@ -567,7 +568,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"110000101011000011010000100100000101101100001001100010101110111110111001111001110010110011000010101"
|
||||
"110001101011101110111100010100100011110100001001110010100000101111000101111001010010000011000110101"
|
||||
},
|
||||
/* 23*/ { BARCODE_HIBC_MICPDF, UNICODE_MODE, -1, 4, "H123ABC01234567890D", 0, 8, 99, 0, "BWIPP uses different encodation, same codeword count but zint full-pad shorter",
|
||||
/* 23*/ { BARCODE_HIBC_MICPDF, -1, UNICODE_MODE, -1, 4, "H123ABC01234567890D", 0, 8, 99, 0, "BWIPP uses different encodation, same codeword count but zint full-pad shorter",
|
||||
"110011101010000110001100100100000100010010001000010110111000111010001001000001001100011011001110101"
|
||||
"111011101011010111111011110111110001110110101000010010111101011100111001011111101001100011101110101"
|
||||
"111001101011001010000111110100011110101000001000011010100111110001101001011011000111100011100110101"
|
||||
|
@ -577,7 +578,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"110000101010110110001000000111000101100111101001100010110111101110000101100010101100000011000010101"
|
||||
"110001101011110110000011010111100100001101101001110010101101011111100001111001000110011011000110101"
|
||||
},
|
||||
/* 24*/ { BARCODE_HIBC_MICPDF, UNICODE_MODE, -1, 1, "/EAH783", 0, 17, 38, 1, "HIBC Provider Applications Standard (PAS) example",
|
||||
/* 24*/ { BARCODE_HIBC_MICPDF, -1, UNICODE_MODE, -1, 1, "/EAH783", 0, 17, 38, 1, "HIBC Provider Applications Standard (PAS) example",
|
||||
"11001101001100011111001001011001101001"
|
||||
"11011101001000001000100100011011101001"
|
||||
"11011001001000100011110100011011001001"
|
||||
|
@ -596,6 +597,31 @@ static void test_encode(int index, int generate, int debug) {
|
|||
"11010000101101100100001111011010000101"
|
||||
"11011000101110111000100010011011000101"
|
||||
},
|
||||
/* 25*/ { BARCODE_PDF417, 9, DATA_MODE, -1, -1, "\342", 0, 7, 103, 1, "β",
|
||||
"1111111101010100011111010101111100110101000110000001100011100011001011110101011110000111111101000101001"
|
||||
"1111111101010100011111010100011000111110101000011001011111100100011011110101001000000111111101000101001"
|
||||
"1111111101010100011101010111111000110110010011110001100011111001001011010100011111000111111101000101001"
|
||||
"1111111101010100011010111100111110100110011100110001010001100001100010101111001111000111111101000101001"
|
||||
"1111111101010100011010111000010000110110001111000101111110010010111011110101110011100111111101000101001"
|
||||
"1111111101010100011110101111010000100011110001000101000110010111000011110101111000010111111101000101001"
|
||||
"1111111101010100011101001110111110101110001110001001010001101100000011010011101111000111111101000101001"
|
||||
},
|
||||
/* 26*/ { BARCODE_MICROPDF417, 9, DATA_MODE, -1, 1, "\342\343", 0, 14, 38, 1, "βγ",
|
||||
"11101110101001111110010110011101110101"
|
||||
"11100110101101010000111110011100110101"
|
||||
"11110110101000001000010001011110110101"
|
||||
"11110010101111001011001100011110010101"
|
||||
"11100010101110110010011111011100010101"
|
||||
"11000010101000011000110010011000010101"
|
||||
"11000110101011111101011000011000110101"
|
||||
"11000100101001111000101000011000100101"
|
||||
"11100100101000100000101000011100100101"
|
||||
"11110100101101110010111111011110100101"
|
||||
"11110101101101100101111000011110101101"
|
||||
"11110101001101011100111100011110101001"
|
||||
"11100101001011100101111100011100101001"
|
||||
"11101101001101001001111100011101101001"
|
||||
},
|
||||
};
|
||||
int data_size = sizeof(data) / sizeof(struct item);
|
||||
|
||||
|
@ -610,24 +636,14 @@ static void test_encode(int index, int generate, int debug) {
|
|||
struct zint_symbol *symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
symbol->symbology = data[i].symbology;
|
||||
symbol->input_mode = data[i].input_mode;
|
||||
if (data[i].option_1 != -1) {
|
||||
symbol->option_1 = data[i].option_1;
|
||||
}
|
||||
if (data[i].option_2 != -1) {
|
||||
symbol->option_2 = data[i].option_2;
|
||||
}
|
||||
symbol->debug |= debug;
|
||||
|
||||
int length = strlen(data[i].data);
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, data[i].eci, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (generate) {
|
||||
printf(" /*%3d*/ { %s, %s, %d, %d, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].option_1, data[i].option_2,
|
||||
printf(" /*%3d*/ { %s, %d, %s, %d, %d, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), data[i].eci, testUtilInputModeName(data[i].input_mode), data[i].option_1, data[i].option_2,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), testUtilErrorName(data[i].ret),
|
||||
symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
|
||||
testUtilModulesDump(symbol, " ", "\n");
|
||||
|
@ -641,7 +657,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
|
||||
assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n", i, ret, width, row, data[i].data);
|
||||
|
||||
if (do_bwipp && testUtilCanBwipp(symbol->symbology, data[i].option_1, data[i].option_2, -1, debug)) {
|
||||
if (do_bwipp && testUtilCanBwipp(i, symbol, data[i].option_1, data[i].option_2, -1, debug)) {
|
||||
if (!data[i].bwipp_cmp) {
|
||||
if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue