mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-21 18:55:11 -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
|
@ -37,7 +37,7 @@ static void test_large(int index, int debug) {
|
|||
|
||||
int ret;
|
||||
struct item {
|
||||
unsigned char *pattern;
|
||||
char *pattern;
|
||||
int length;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
|
@ -71,7 +71,7 @@ static void test_large(int index, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, BARCODE_CODABLOCKF, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -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) {
|
||||
|
@ -94,7 +94,7 @@ static void test_options(int index, int debug) {
|
|||
int input_mode;
|
||||
int option_1;
|
||||
int option_2;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
|
@ -138,7 +138,7 @@ static void test_options(int index, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, BARCODE_CODABLOCKF, data[i].input_mode, -1 /*eci*/, data[i].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 (ret < 5) {
|
||||
|
@ -161,7 +161,7 @@ static void test_reader_init(int index, int generate, int debug) {
|
|||
int symbology;
|
||||
int input_mode;
|
||||
int output_options;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
int expected_width;
|
||||
|
@ -187,7 +187,7 @@ static void test_reader_init(int index, int generate, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, -1 /*option_2*/, -1, data[i].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) {
|
||||
|
@ -199,7 +199,7 @@ static void test_reader_init(int index, int generate, int debug) {
|
|||
if (ret < 5) {
|
||||
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);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, data[i].data);
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||
assert_zero(strcmp((char *) symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ static void test_input(int index, int generate, int debug) {
|
|||
int symbology;
|
||||
int input_mode;
|
||||
int option_2;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int length;
|
||||
int ret;
|
||||
int expected_rows;
|
||||
|
@ -294,7 +294,7 @@ static void test_input(int index, int generate, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, 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) {
|
||||
|
@ -306,7 +306,7 @@ static void test_input(int index, int generate, int debug) {
|
|||
if (ret < 5) {
|
||||
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);
|
||||
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, data[i].data);
|
||||
assert_zero(strcmp(symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||
assert_zero(strcmp((char *) symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -327,7 +327,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
int symbology;
|
||||
int option_1;
|
||||
int option_2;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
int expected_rows;
|
||||
|
@ -426,7 +426,7 @@ static void test_encode(int index, int generate, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, data[i].symbology, UNICODE_MODE, -1 /*eci*/, data[i].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) {
|
||||
|
@ -472,7 +472,7 @@ static void test_fuzz(int index, int debug) {
|
|||
|
||||
int ret;
|
||||
struct item {
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
int length;
|
||||
int ret;
|
||||
};
|
||||
|
@ -491,7 +491,7 @@ static void test_fuzz(int index, int debug) {
|
|||
|
||||
int length = testUtilSetSymbol(symbol, BARCODE_CODABLOCKF, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, data[i].length, 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);
|
||||
|
||||
ZBarcode_Delete(symbol);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue