mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-31 07:08:26 -04:00
Tabs/typo in zint.h; PostNet -> POSTNET; ui: shortcuts, tooltips; tests inkscape -> libreoffice
This commit is contained in:
parent
36c19053d7
commit
e37a82a8f1
90 changed files with 1048 additions and 840 deletions
|
@ -39,7 +39,7 @@ static void test_large(int index, int debug) {
|
|||
struct item {
|
||||
int symbology;
|
||||
int option_2;
|
||||
unsigned char *pattern;
|
||||
char *pattern;
|
||||
int length;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
|
@ -74,7 +74,7 @@ static void test_large(int index, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data_buf, data[i].length, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, data_buf, length);
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (ret < 5) {
|
||||
|
@ -96,9 +96,9 @@ static void test_hrt(int index, int debug) {
|
|||
struct item {
|
||||
int symbology;
|
||||
int option_2;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
|
||||
unsigned char *expected;
|
||||
char *expected;
|
||||
};
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
|
@ -112,8 +112,6 @@ static void test_hrt(int index, int debug) {
|
|||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
|
||||
char *text;
|
||||
|
||||
for (int i = 0; i < data_size; i++) {
|
||||
|
||||
if (index != -1 && i != index) continue;
|
||||
|
@ -123,10 +121,10 @@ static void test_hrt(int index, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, data[i].data, length);
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_zero(ret, "i:%d ZBarcode_Encode ret %d != 0 %s\n", i, ret, symbol->errtxt);
|
||||
|
||||
assert_zero(strcmp(symbol->text, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->text, data[i].expected);
|
||||
assert_zero(strcmp((char *) symbol->text, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->text, data[i].expected);
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
}
|
||||
|
@ -141,7 +139,7 @@ static void test_input(int index, int debug) {
|
|||
int ret;
|
||||
struct item {
|
||||
int symbology;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
|
@ -186,7 +184,7 @@ static void test_input(int index, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, data[i].data, length);
|
||||
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 (ret < 5) {
|
||||
|
@ -210,7 +208,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
struct item {
|
||||
int symbology;
|
||||
int option_2;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
int expected_rows;
|
||||
|
@ -267,7 +265,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, data[i].data, length);
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue