mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-25 12:34:24 -04:00
testcommon: fix sizeof bug; AZTEC/QR: suppress cppcheck warnings (#233)
This commit is contained in:
parent
9b02cd5221
commit
4d3aae45d0
13 changed files with 184 additions and 110 deletions
|
@ -2652,6 +2652,7 @@ static void test_rmqr_encode(int index, int generate, int debug) {
|
|||
char *comment;
|
||||
char *expected;
|
||||
};
|
||||
// Note very little available to compare these to (BWIPP gives very different results TODO: investigate) so should be considered "unproven"
|
||||
struct item data[] = {
|
||||
/* 0*/ { UNICODE_MODE, "0123456", 4, 11, 0, 11, 27, "Draft ISO 2018-6-8 Annex H I.2, currently no image to compare to",
|
||||
"111111101010101010101010111"
|
||||
|
@ -2681,6 +2682,75 @@ static void test_rmqr_encode(int index, int generate, int debug) {
|
|||
"101101101100110111000010001"
|
||||
"111010101010101010101011111"
|
||||
},
|
||||
/* 2*/ { UNICODE_MODE, "123456789012", -1, 1, 0, 7, 43, "R7x34 M max numeric 12 digits",
|
||||
"1111111010101010101011101010101010101010111"
|
||||
"1000001001011011001110111100000000011000101"
|
||||
"1011101010110010101111101001000111111111111"
|
||||
"1011101001101000000100111011010101000010001"
|
||||
"1011101000111001001111110010111101110010101"
|
||||
"1000001011111101000110100110000000011010001"
|
||||
"1111111010101010101011101010101010101011111"
|
||||
},
|
||||
/* 3*/ { UNICODE_MODE, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", 4, 32, 0, 17, 139, "R17x139 H max numeric 178 digits",
|
||||
"1111111010101010101010101011101010101010101010101010101110101010101010101010101010111010101010101010101010101011101010101010101010101010111"
|
||||
"1000001011001000110010100110111110011010111100010111001010001011000101011111010101101010110111011011111110010110100110010111101000100111001"
|
||||
"1011101010000000000011101111110000111110100010101011001111101110111000000101100010111111010110100111111010000011100001110011001100010010001"
|
||||
"1011101010010001001011011110110110001011110111000001111000011010111010001110100001001101110010000101111110100110111111101000000001000010000"
|
||||
"1011101001001111000111101011001111001111010001011011011110111000111001000100111001110111001001011000101011111111111111001101010011111000111"
|
||||
"1000001010001010101111010110110110101110111110111100010001000011101011101010001111001001100101001010001001011000111000011111101001010010010"
|
||||
"1111111010000101010101110011100101000111101010101110100111101111100000110100110101110101010011100011001100010001100000100110111011111110011"
|
||||
"0000000000011101001101111000100110010011011001110000111000111101011000111111101010000101001011110001000101101110100100100000010010111100100"
|
||||
"1111010111011011000110010101111110011000010100000011011110010011100001111101000010010101001111111010000111101101111011011000010100010001101"
|
||||
"0111101110101010001010101110000111000110011011010110100001111100111100101100100001000010101101100010101000010100001111011111101110110001010"
|
||||
"1111111110011100100100000111000011110101110100011000110100011110000100111000110110111001101100001110111000100011001000110011101101000110011"
|
||||
"0110110101110001110100000110101010100000011001011000000001001111111001010101001110000111101100000100011110100010110111100101000001001011010"
|
||||
"1010010110011001000100010001000111111110101001001111001101010001000111010101001101011111111000111111001011001111110111101010010010111011111"
|
||||
"0011110011110100101011001000001010100011101111100100001000011000111100011011110010001101000111101011100001010100101010001110111001111110001"
|
||||
"1011101000011100110000101111100101100011010011000110011110101101000101011010001011111010000101000100110100010111110000110111101010111110101"
|
||||
"1000101001111010100011010110111110101000110110000000101011110010110010010000110110101111110010110100110111101010110000100000011110010110001"
|
||||
"1110101010101010101010101011101010101010101010101010101110101010101010101010101010111010101010101010101010101011101010101010101010101011111"
|
||||
},
|
||||
/* 4*/ { UNICODE_MODE, "123456789012345678901234567890123456789012345678901234", 4, 33, 0, 7, 139, "R7xauto H max numeric 54 digits",
|
||||
"1111111010101010101010101011101010101010101010101010101110101010101010101010101010111010101010101010101010101011101010101010101010101010111"
|
||||
"1000001011011110100001110010100100001111000111011101011011001100000111111010011111101110111011101001010011101110111011000110000001001000001"
|
||||
"1011101000010001001110011111100000100110110101101011101110101000100001001100001110111010100000110100100001111011101000110111011110101011111"
|
||||
"1011101001111010110000111110101111100001011110010111010010111110100110011111111111101101010101000111101010011000110111101010001100000010001"
|
||||
"1011101011110100001010000011101111100111101100000011011110100010111101101100100111111011101000110101101000000111101110111001010100101010101"
|
||||
"1000001010001000001011100010101001100011000011000010011011011011011111110010010011101000011010011110010110111010101010010011111110010110001"
|
||||
"1111111010101010101010101011101010101010101010101010101110101010101010101010101010111010101010101010101010101011101010101010101010101011111"
|
||||
},
|
||||
/* 5*/ { UNICODE_MODE, "123456789012345678901234567890123", 4, 35, 0, 11, 59, "R11xauto H with max numeric 33 digits for width 59",
|
||||
"11111110101010101011101010101010101010111010101010101010111"
|
||||
"10000010101010010010100111111011011110101001100110110011001"
|
||||
"10111010000110110111101001001010100001111010000100000000011"
|
||||
"10111010101111011100110000010110100101100001111110110110100"
|
||||
"10111010001110111011111110110011010100011010101010010000101"
|
||||
"10000010000110100110000001000110110100100000001100100110000"
|
||||
"11111110111000101111111010001011010011111111101101101011111"
|
||||
"00000000010001110000100101111101101110100011001010111010001"
|
||||
"11010101101011100011100001110011000010111111110000010010101"
|
||||
"10011110000011110010101110111110000100101110100001000110001"
|
||||
"11101010101010101011101010101010101010111010101010101011111"
|
||||
},
|
||||
/* 6*/ { UNICODE_MODE, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", -1, 38, 0, 17, 139, "R17xauto M max numeric 361 digits",
|
||||
"1111111010101010101010101011101010101010101010101010101110101010101010101010101010111010101010101010101010101011101010101010101010101010111"
|
||||
"1000001001000101001111000010110100001000101100110001101010100000111110001000100011101011111000001110011001110010100111000101001100000001101"
|
||||
"1011101011100100000111001011101001110010101001100000001111010010111111101001111110111000101000010010110101111111111101111101101000001011001"
|
||||
"1011101001000111010101101000100010100110111111000010001010000111000001110010101101101100011111010001000111001110011101000011110011100111010"
|
||||
"1011101000011011001010110111000101101000011001111111100110101100100010000110011000110010001110111101000010010001000111100010001111110010101"
|
||||
"1000001000010011010111011100110011101001111000011100111001111010111111001101001001101010001000000100111100000100000000111100001000011110110"
|
||||
"1111111011000011001100001011100101010100001110100100010101100010100001111000000110011101001100000011111010101111101010011101110001001101101"
|
||||
"0000000010101010011100011110100011110101111000010000000010110101000000110111010110100101100101111001001000101010011001000010010111110000110"
|
||||
"1111000101000101010110010101111001011001110001111100101110110101011111010111100011110000110011101111100001010011010011000010011110110010011"
|
||||
"0111110010111110100111011100100110100111011110110111111000100100111111001000100001001010111010000110011001110110001110100011101010000101010"
|
||||
"1000110110001000011011011001101111100101110100110000000101010010110110101100011100011111101000011010110100011101100100111101100100001010011"
|
||||
"0010111001011000101010100000011101100011011000111100001000000111001000110110111111100101010111010001000111001000011101011100100101111011110"
|
||||
"1000000110001011100000011101011000110101100001100011100110101100100000011011110100110101010110111101000010000011100110100011011011110111111"
|
||||
"0010111110101011111010111110000101111100111101001010111001111010111111111001011100001111101000100100111100010010000010111111011011000110001"
|
||||
"1101011001000100011101010111100001001010100010010110011111100011000101100010001111111011100101000011111110101111101000011110100000010110101"
|
||||
"1001100101010101001010100010100011011100111001110111011010110101000100100111100110101011100101111011001010100110111111000010110110100110001"
|
||||
"1110101010101010101010101011101010101010101010101010101110101010101010101010101010111010101010101010101010101011101010101010101010101011111"
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
@ -2705,7 +2775,7 @@ static void test_rmqr_encode(int index, int generate, int debug) {
|
|||
i, testUtilInputModeName(data[i].input_mode), data[i].data, data[i].option_1, data[i].option_2, testUtilErrorName(data[i].ret),
|
||||
symbol->rows, symbol->width, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
printf(" },\n");
|
||||
printf(" },\n");
|
||||
} else {
|
||||
if (ret < ZINT_ERROR) {
|
||||
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, data[i].data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue