2019-09-02 08:09:47 +12:00
|
|
|
/*
|
|
|
|
libzint - the open source barcode library
|
2023-02-11 03:44:10 +13:00
|
|
|
Copyright (C) 2019-2023 Robin Stuart <rstuart114@gmail.com>
|
2019-09-02 08:09:47 +12:00
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions
|
|
|
|
are met:
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer in the
|
|
|
|
documentation and/or other materials provided with the distribution.
|
|
|
|
3. Neither the name of the project nor the names of its contributors
|
|
|
|
may be used to endorse or promote products derived from this software
|
|
|
|
without specific prior written permission.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
|
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Adapted from qrencode/tests/common.h
|
|
|
|
* Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
|
|
|
|
*/
|
2022-07-04 10:54:42 +12:00
|
|
|
/* Due to above: */
|
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
2019-09-02 08:09:47 +12:00
|
|
|
|
2022-04-10 22:12:18 +12:00
|
|
|
#ifndef Z_TESTCOMMON_H
|
|
|
|
#define Z_TESTCOMMON_H
|
2019-09-02 08:09:47 +12:00
|
|
|
|
2022-09-13 06:26:04 +12:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-05-26 07:42:26 +12:00
|
|
|
#define ZINT_DEBUG_TEST_PRINT 16
|
|
|
|
#define ZINT_DEBUG_TEST_LESS_NOISY 32
|
|
|
|
#define ZINT_DEBUG_TEST_KEEP_OUTFILE 64
|
|
|
|
#define ZINT_DEBUG_TEST_BWIPP 128
|
|
|
|
#define ZINT_DEBUG_TEST_PERFORMANCE 256
|
2021-12-19 05:22:02 +13:00
|
|
|
#define ZINT_DEBUG_TEST_ZXINGCPP 512
|
2021-05-26 07:42:26 +12:00
|
|
|
|
2022-07-15 03:01:30 +12:00
|
|
|
#include <errno.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "../common.h"
|
|
|
|
|
2021-06-10 22:15:39 +12:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define testutil_popen(command, mode) _popen(command, mode)
|
|
|
|
#define testutil_pclose(stream) _pclose(stream)
|
2021-03-31 00:18:40 +13:00
|
|
|
#else
|
|
|
|
#include <unistd.h>
|
2023-12-28 08:20:19 +13:00
|
|
|
# if defined(ZINT_IS_C89) || defined(ZINT_IS_C99)
|
2022-09-13 06:26:04 +12:00
|
|
|
extern FILE *popen(const char *command, const char *type);
|
|
|
|
extern int pclose(FILE *stream);
|
|
|
|
# endif
|
2021-06-10 22:15:39 +12:00
|
|
|
#define testutil_popen(command, mode) popen(command, mode)
|
|
|
|
#define testutil_pclose(stream) pclose(stream)
|
|
|
|
#endif
|
|
|
|
|
2024-05-28 10:19:45 +12:00
|
|
|
#if defined(__GNUC__)
|
2021-06-10 22:15:39 +12:00
|
|
|
# pragma GCC diagnostic ignored "-Wpedantic"
|
|
|
|
# pragma GCC diagnostic ignored "-Woverlength-strings"
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
# pragma warning(disable: 4305) /* truncation from 'double' to 'float' */
|
|
|
|
#endif
|
|
|
|
|
2019-09-02 08:09:47 +12:00
|
|
|
extern int assertionFailed;
|
|
|
|
extern int assertionNum;
|
2023-06-12 12:25:55 +12:00
|
|
|
extern struct zint_symbol **assertionPPSymbol;
|
2021-06-27 22:47:55 +12:00
|
|
|
extern const char *assertionFilename;
|
2019-09-02 08:09:47 +12:00
|
|
|
|
2022-09-13 06:26:04 +12:00
|
|
|
#if defined(_MSC_VER) && _MSC_VER < 1900 /* MSVC 2015 */
|
2023-06-12 12:25:55 +12:00
|
|
|
#define testStart(name) (testStartReal("", name, NULL))
|
|
|
|
#define testStartSymbol(name, pp_symbol) (testStartReal("", name, pp_symbol))
|
2021-06-24 02:00:49 +12:00
|
|
|
#else
|
2023-06-12 12:25:55 +12:00
|
|
|
#define testStart(name) (testStartReal(__func__, name, NULL))
|
|
|
|
#define testStartSymbol(name, pp_symbol) (testStartReal(__func__, name, pp_symbol))
|
2021-06-24 02:00:49 +12:00
|
|
|
#endif
|
2023-06-12 12:25:55 +12:00
|
|
|
void testStartReal(const char *func, const char *name, struct zint_symbol **pp_symbol);
|
2019-09-02 08:09:47 +12:00
|
|
|
void testFinish(void);
|
2020-05-06 09:28:25 +12:00
|
|
|
void testSkip(const char *msg);
|
2021-11-26 01:09:30 +13:00
|
|
|
void testReport(void);
|
2019-09-02 08:09:47 +12:00
|
|
|
|
- API: add new zint_symbol `dpmm` field for output resolution (BMP/
EMF/PCX/PNG/TIF only, i.e. excluding EPS, GIF & SVG)
- Add support for specifying scale by X-dimension and resolution
with new option `--scalexdimdp` for CLI/Tcl & new API function
`ZBarcode_Scale_From_XdimDp()` (+ `ZBarcode_XdimDp_From_Scale()`
& `ZBarcode_Default_Xdim()`) and new GUI popup; manual: document
- BMP/EMF/PCX/PNG/TIF: use new `dpmm` resolution field (for EMF
following Inkscape)
- backend_qt: add `dpmm()`, `vectorWidth()`, `vectorHeight()`,
`noPng()`, `getVersion()`, `takesGS1AIData()`, & `XdimDp` stuff
incl. new `QZintXdimDp` struct for passing around scale vars &
use in `getAsCLI()`; add comments
- Raise `scale` limit to 200 (from 100) to allow for large dpmm
- output: create directories & subdirectories as necessary for
output path using new function `out_fopen()` and use in BMP/EMF/
EPS/GIF/PCX/PNG/SVG/TIF
- DPLEIT/DPIDENT: format HRT according to (incomplete)
documentation, and set default height to 72X (from 50X)
- CODE128B renamed to CODE128AB as can use subsets A and/or B
- CODABAR: fix minimum height calc
- EMF: fix indexing of handles (zero-based not 1-based)
- GUI: fix symbology zap (previous technique of clearing and
re-loading settings without doing a sync no longer works);
fix UPCEAN guard descent enable
- MAILMARK: better error message if input < 14 characters
- GUI: add "Default" button for DAFT tracker ratio & enable/disable
various default buttons; use new `takesGS1AIData()` to
enable/disable GS1-specific checkboxes
- CLI: use new `validate_float()` to parse float options (7
significant digits allowed only, no scientific notation)
- DATAMATRIX/GRIDMATRIX/PDF417/QR/ULTRA: micro-optimize structapp
ID parse
- library/CLI: fiddle with static asserts (make CHAR_BIT sensitive,
supposedly)
- win32/README: update building libpng (assembly removed)
- README.linux: document incompatibility of Qt6 >= 6.3
- manual: expand Barcode Studio waffle
- test suite: change range separator to hyphen and allow multiple
excludes
2022-12-03 10:39:01 +13:00
|
|
|
#define ZINT_TEST_CTX_EXC_MAX 32
|
2022-09-13 06:26:04 +12:00
|
|
|
typedef struct s_testCtx {
|
|
|
|
int index;
|
|
|
|
int index_end;
|
- API: add new zint_symbol `dpmm` field for output resolution (BMP/
EMF/PCX/PNG/TIF only, i.e. excluding EPS, GIF & SVG)
- Add support for specifying scale by X-dimension and resolution
with new option `--scalexdimdp` for CLI/Tcl & new API function
`ZBarcode_Scale_From_XdimDp()` (+ `ZBarcode_XdimDp_From_Scale()`
& `ZBarcode_Default_Xdim()`) and new GUI popup; manual: document
- BMP/EMF/PCX/PNG/TIF: use new `dpmm` resolution field (for EMF
following Inkscape)
- backend_qt: add `dpmm()`, `vectorWidth()`, `vectorHeight()`,
`noPng()`, `getVersion()`, `takesGS1AIData()`, & `XdimDp` stuff
incl. new `QZintXdimDp` struct for passing around scale vars &
use in `getAsCLI()`; add comments
- Raise `scale` limit to 200 (from 100) to allow for large dpmm
- output: create directories & subdirectories as necessary for
output path using new function `out_fopen()` and use in BMP/EMF/
EPS/GIF/PCX/PNG/SVG/TIF
- DPLEIT/DPIDENT: format HRT according to (incomplete)
documentation, and set default height to 72X (from 50X)
- CODE128B renamed to CODE128AB as can use subsets A and/or B
- CODABAR: fix minimum height calc
- EMF: fix indexing of handles (zero-based not 1-based)
- GUI: fix symbology zap (previous technique of clearing and
re-loading settings without doing a sync no longer works);
fix UPCEAN guard descent enable
- MAILMARK: better error message if input < 14 characters
- GUI: add "Default" button for DAFT tracker ratio & enable/disable
various default buttons; use new `takesGS1AIData()` to
enable/disable GS1-specific checkboxes
- CLI: use new `validate_float()` to parse float options (7
significant digits allowed only, no scientific notation)
- DATAMATRIX/GRIDMATRIX/PDF417/QR/ULTRA: micro-optimize structapp
ID parse
- library/CLI: fiddle with static asserts (make CHAR_BIT sensitive,
supposedly)
- win32/README: update building libpng (assembly removed)
- README.linux: document incompatibility of Qt6 >= 6.3
- manual: expand Barcode Studio waffle
- test suite: change range separator to hyphen and allow multiple
excludes
2022-12-03 10:39:01 +13:00
|
|
|
int exclude[ZINT_TEST_CTX_EXC_MAX];
|
|
|
|
int exclude_end[ZINT_TEST_CTX_EXC_MAX];
|
2022-09-13 06:26:04 +12:00
|
|
|
int generate;
|
|
|
|
int debug;
|
|
|
|
} testCtx;
|
|
|
|
typedef void (*testFunc_t)(const testCtx *const p_ctx);
|
2021-06-10 22:15:39 +12:00
|
|
|
typedef struct s_testFunction {
|
2022-09-13 06:26:04 +12:00
|
|
|
const char *name; testFunc_t func;
|
2021-06-10 22:15:39 +12:00
|
|
|
} testFunction;
|
2020-05-06 09:28:25 +12:00
|
|
|
void testRun(int argc, char *argv[], testFunction funcs[], int funcs_size);
|
2022-09-13 06:26:04 +12:00
|
|
|
int testContinue(const testCtx *const p_ctx, const int i);
|
2020-05-06 09:28:25 +12:00
|
|
|
|
2024-05-28 10:19:45 +12:00
|
|
|
#if (defined(_MSC_VER) &&_MSC_VER <= 1200) || defined(ZINT_IS_C89) /* VC6 or C89 */
|
2021-06-24 02:00:49 +12:00
|
|
|
void assert_zero(int exp, const char *fmt, ...);
|
|
|
|
void assert_nonzero(int exp, const char *fmt, ...);
|
2021-10-21 11:05:30 +13:00
|
|
|
void assert_null(const void *exp, const char *fmt, ...);
|
|
|
|
void assert_nonnull(const void *exp, const char *fmt, ...);
|
2021-06-24 02:00:49 +12:00
|
|
|
void assert_equal(int e1, int e2, const char *fmt, ...);
|
|
|
|
void assert_equalu64(uint64_t e1, uint64_t e2, const char *fmt, ...);
|
2022-09-13 06:26:04 +12:00
|
|
|
void assert_notequal(int e1, int e2, const char *fmt, ...);
|
2021-06-24 02:00:49 +12:00
|
|
|
#else
|
2023-06-12 12:25:55 +12:00
|
|
|
#define assert_exp(exp, ...) \
|
|
|
|
{ assertionNum++; if (!(exp)) { assertionFailed++; printf("%s:%d ", assertionFilename, __LINE__); \
|
|
|
|
printf(__VA_ARGS__); testFinish(); \
|
|
|
|
if (assertionPPSymbol) { ZBarcode_Delete(*assertionPPSymbol); assertionPPSymbol = NULL; } return; } }
|
|
|
|
|
|
|
|
#define assert_zero(exp, ...) assert_exp((exp) == 0, __VA_ARGS__)
|
|
|
|
#define assert_nonzero(exp, ...) assert_exp((exp) != 0, __VA_ARGS__)
|
|
|
|
#define assert_null(ptr, ...) assert_exp((ptr) == NULL, __VA_ARGS__)
|
|
|
|
#define assert_nonnull(ptr, ...) assert_exp((ptr) != NULL, __VA_ARGS__)
|
|
|
|
#define assert_equal(e1, e2, ...) assert_exp((e1) == (e2), __VA_ARGS__)
|
2021-06-24 02:00:49 +12:00
|
|
|
#define assert_equalu64 assert_equal
|
2023-06-12 12:25:55 +12:00
|
|
|
#define assert_notequal(e1, e2, ...) assert_exp((e1) != (e2), __VA_ARGS__)
|
2021-06-24 02:00:49 +12:00
|
|
|
#endif
|
2019-09-02 08:09:47 +12:00
|
|
|
|
Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
2022-05-10 06:50:50 +12:00
|
|
|
#define TU(p) ((unsigned char *) (p))
|
|
|
|
|
2020-12-22 08:30:07 +13:00
|
|
|
INTERNAL void vector_free(struct zint_symbol *symbol); /* Free vector structures */
|
2019-09-02 08:09:47 +12:00
|
|
|
|
2021-06-10 22:15:39 +12:00
|
|
|
int testUtilSetSymbol(struct zint_symbol *symbol, int symbology, int input_mode, int eci,
|
2023-02-11 03:44:10 +13:00
|
|
|
int option_1, int option_2, int option_3, int output_options, const char *data, int length, int debug);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2020-10-01 00:19:12 +13:00
|
|
|
const char *testUtilBarcodeName(int symbology);
|
|
|
|
const char *testUtilErrorName(int error_number);
|
|
|
|
const char *testUtilInputModeName(int input_mode);
|
2023-11-30 22:12:11 +13:00
|
|
|
const char *testUtilOption3Name(int symbology, int option_3);
|
2020-10-01 00:19:12 +13:00
|
|
|
const char *testUtilOutputOptionsName(int output_options);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2021-10-21 11:05:30 +13:00
|
|
|
int testUtilDAFTConvert(const struct zint_symbol *symbol, char *buffer, const int buffer_size);
|
2021-02-23 13:01:15 +13:00
|
|
|
int testUtilIsValidUTF8(const unsigned char str[], const int length);
|
2021-10-21 11:05:30 +13:00
|
|
|
char *testUtilEscape(const char *buffer, const int length, char *escaped, const int escaped_size);
|
|
|
|
const char *testUtilReadCSVField(const char *buffer, char *field, const int field_size);
|
|
|
|
void testUtilStrCpyRepeat(char *buffer, const char *repeat, const int size);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2020-05-06 09:28:25 +12:00
|
|
|
int testUtilSymbolCmp(const struct zint_symbol *a, const struct zint_symbol *b);
|
|
|
|
struct zint_vector *testUtilVectorCpy(const struct zint_vector *in);
|
|
|
|
int testUtilVectorCmp(const struct zint_vector *a, const struct zint_vector *b);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2021-02-23 13:01:15 +13:00
|
|
|
int testUtilModulesDump(const struct zint_symbol *symbol, char dump[], int dump_size);
|
|
|
|
void testUtilModulesPrint(const struct zint_symbol *symbol, const char *prefix, const char *postfix);
|
|
|
|
void testUtilModulesPrintRow(const struct zint_symbol *symbol, int row, const char *prefix, const char *postfix);
|
2020-06-15 01:42:40 +12:00
|
|
|
int testUtilModulesCmp(const struct zint_symbol *symbol, const char *expected, int *width, int *row);
|
|
|
|
int testUtilModulesCmpRow(const struct zint_symbol *symbol, int row, const char *expected, int *width);
|
|
|
|
char *testUtilUIntArrayDump(unsigned int *array, int size, char *dump, int dump_size);
|
|
|
|
char *testUtilUCharArrayDump(unsigned char *array, int size, char *dump, int dump_size);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2020-11-02 07:32:55 +13:00
|
|
|
void testUtilBitmapPrint(const struct zint_symbol *symbol, const char *prefix, const char *postfix);
|
|
|
|
int testUtilBitmapCmp(const struct zint_symbol *symbol, const char *expected, int *row, int *column);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2023-06-12 12:25:55 +12:00
|
|
|
void testUtilVectorPrint(const struct zint_symbol *symbol);
|
|
|
|
|
2021-06-27 22:47:55 +12:00
|
|
|
int testUtilDataPath(char *buffer, int buffer_size, const char *subdir, const char *filename);
|
2023-05-11 08:29:09 +12:00
|
|
|
FILE *testUtilOpen(const char *filename, const char *mode);
|
2021-06-14 11:48:29 +12:00
|
|
|
int testUtilExists(const char *filename);
|
2023-05-10 11:47:44 +12:00
|
|
|
int testUtilRemove(const char *filename);
|
2021-06-24 02:00:49 +12:00
|
|
|
int testUtilDirExists(const char *dirname);
|
|
|
|
int testUtilMkDir(const char *dirname);
|
|
|
|
int testUtilRmDir(const char *dirname);
|
|
|
|
int testUtilRename(const char *oldpath, const char *newpath);
|
- API: add new zint_symbol `dpmm` field for output resolution (BMP/
EMF/PCX/PNG/TIF only, i.e. excluding EPS, GIF & SVG)
- Add support for specifying scale by X-dimension and resolution
with new option `--scalexdimdp` for CLI/Tcl & new API function
`ZBarcode_Scale_From_XdimDp()` (+ `ZBarcode_XdimDp_From_Scale()`
& `ZBarcode_Default_Xdim()`) and new GUI popup; manual: document
- BMP/EMF/PCX/PNG/TIF: use new `dpmm` resolution field (for EMF
following Inkscape)
- backend_qt: add `dpmm()`, `vectorWidth()`, `vectorHeight()`,
`noPng()`, `getVersion()`, `takesGS1AIData()`, & `XdimDp` stuff
incl. new `QZintXdimDp` struct for passing around scale vars &
use in `getAsCLI()`; add comments
- Raise `scale` limit to 200 (from 100) to allow for large dpmm
- output: create directories & subdirectories as necessary for
output path using new function `out_fopen()` and use in BMP/EMF/
EPS/GIF/PCX/PNG/SVG/TIF
- DPLEIT/DPIDENT: format HRT according to (incomplete)
documentation, and set default height to 72X (from 50X)
- CODE128B renamed to CODE128AB as can use subsets A and/or B
- CODABAR: fix minimum height calc
- EMF: fix indexing of handles (zero-based not 1-based)
- GUI: fix symbology zap (previous technique of clearing and
re-loading settings without doing a sync no longer works);
fix UPCEAN guard descent enable
- MAILMARK: better error message if input < 14 characters
- GUI: add "Default" button for DAFT tracker ratio & enable/disable
various default buttons; use new `takesGS1AIData()` to
enable/disable GS1-specific checkboxes
- CLI: use new `validate_float()` to parse float options (7
significant digits allowed only, no scientific notation)
- DATAMATRIX/GRIDMATRIX/PDF417/QR/ULTRA: micro-optimize structapp
ID parse
- library/CLI: fiddle with static asserts (make CHAR_BIT sensitive,
supposedly)
- win32/README: update building libpng (assembly removed)
- README.linux: document incompatibility of Qt6 >= 6.3
- manual: expand Barcode Studio waffle
- test suite: change range separator to hyphen and allow multiple
excludes
2022-12-03 10:39:01 +13:00
|
|
|
int testUtilCreateROFile(const char *filename);
|
|
|
|
int testUtilRmROFile(const char *filename);
|
2023-12-28 08:20:19 +13:00
|
|
|
int testUtilReadFile(const char *filename, unsigned char *buffer, int buffer_size, int *p_size);
|
|
|
|
int testUtilWriteFile(const char *filename, const unsigned char *buffer, const int buffer_size, const char *mode);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2021-06-14 11:48:29 +12:00
|
|
|
int testUtilCmpPngs(const char *file1, const char *file2);
|
|
|
|
int testUtilCmpTxts(const char *txt1, const char *txt2);
|
|
|
|
int testUtilCmpBins(const char *bin1, const char *bin2);
|
|
|
|
int testUtilCmpSvgs(const char *svg1, const char *svg2);
|
|
|
|
int testUtilCmpEpss(const char *eps1, const char *eps2);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
- API: add new zint_symbol `dpmm` field for output resolution (BMP/
EMF/PCX/PNG/TIF only, i.e. excluding EPS, GIF & SVG)
- Add support for specifying scale by X-dimension and resolution
with new option `--scalexdimdp` for CLI/Tcl & new API function
`ZBarcode_Scale_From_XdimDp()` (+ `ZBarcode_XdimDp_From_Scale()`
& `ZBarcode_Default_Xdim()`) and new GUI popup; manual: document
- BMP/EMF/PCX/PNG/TIF: use new `dpmm` resolution field (for EMF
following Inkscape)
- backend_qt: add `dpmm()`, `vectorWidth()`, `vectorHeight()`,
`noPng()`, `getVersion()`, `takesGS1AIData()`, & `XdimDp` stuff
incl. new `QZintXdimDp` struct for passing around scale vars &
use in `getAsCLI()`; add comments
- Raise `scale` limit to 200 (from 100) to allow for large dpmm
- output: create directories & subdirectories as necessary for
output path using new function `out_fopen()` and use in BMP/EMF/
EPS/GIF/PCX/PNG/SVG/TIF
- DPLEIT/DPIDENT: format HRT according to (incomplete)
documentation, and set default height to 72X (from 50X)
- CODE128B renamed to CODE128AB as can use subsets A and/or B
- CODABAR: fix minimum height calc
- EMF: fix indexing of handles (zero-based not 1-based)
- GUI: fix symbology zap (previous technique of clearing and
re-loading settings without doing a sync no longer works);
fix UPCEAN guard descent enable
- MAILMARK: better error message if input < 14 characters
- GUI: add "Default" button for DAFT tracker ratio & enable/disable
various default buttons; use new `takesGS1AIData()` to
enable/disable GS1-specific checkboxes
- CLI: use new `validate_float()` to parse float options (7
significant digits allowed only, no scientific notation)
- DATAMATRIX/GRIDMATRIX/PDF417/QR/ULTRA: micro-optimize structapp
ID parse
- library/CLI: fiddle with static asserts (make CHAR_BIT sensitive,
supposedly)
- win32/README: update building libpng (assembly removed)
- README.linux: document incompatibility of Qt6 >= 6.3
- manual: expand Barcode Studio waffle
- test suite: change range separator to hyphen and allow multiple
excludes
2022-12-03 10:39:01 +13:00
|
|
|
const char *testUtilHaveIdentify(void);
|
|
|
|
int testUtilVerifyIdentify(const char *const prog, const char *filename, int debug);
|
2021-11-26 01:09:30 +13:00
|
|
|
int testUtilHaveLibreOffice(void);
|
2021-06-14 11:48:29 +12:00
|
|
|
int testUtilVerifyLibreOffice(const char *filename, int debug);
|
2021-11-26 01:09:30 +13:00
|
|
|
int testUtilHaveGhostscript(void);
|
2021-06-14 11:48:29 +12:00
|
|
|
int testUtilVerifyGhostscript(const char *filename, int debug);
|
2021-11-26 01:09:30 +13:00
|
|
|
int testUtilHaveVnu(void);
|
2021-06-14 11:48:29 +12:00
|
|
|
int testUtilVerifyVnu(const char *filename, int debug);
|
2021-11-26 01:09:30 +13:00
|
|
|
int testUtilHaveTiffInfo(void);
|
2021-06-14 11:48:29 +12:00
|
|
|
int testUtilVerifyTiffInfo(const char *filename, int debug);
|
2021-06-27 22:47:55 +12:00
|
|
|
|
2021-06-10 22:15:39 +12:00
|
|
|
int testUtilCanBwipp(int index, const struct zint_symbol *symbol, int option_1, int option_2, int option_3,
|
|
|
|
int debug);
|
|
|
|
int testUtilBwipp(int index, const struct zint_symbol *symbol, int option_1, int option_2, int option_3,
|
Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
2022-05-10 06:50:50 +12:00
|
|
|
const char *data, int length, const char *primary, char *buffer, int buffer_size, int *p_parsefnc);
|
|
|
|
int testUtilBwippSegs(int index, struct zint_symbol *symbol, int option_1, int option_2, int option_3,
|
|
|
|
const struct zint_seg segs[], const int seg_count, const char *primary, char *buffer, int buffer_size);
|
2021-12-09 07:12:20 +13:00
|
|
|
int testUtilBwippCmp(const struct zint_symbol *symbol, char *msg, char *cmp_buf, const char *expected);
|
|
|
|
int testUtilBwippCmpRow(const struct zint_symbol *symbol, int row, char *msg, const char *cmp_buf,
|
2021-06-10 22:15:39 +12:00
|
|
|
const char *expected);
|
2019-09-02 08:09:47 +12:00
|
|
|
|
2021-12-09 07:12:20 +13:00
|
|
|
int testUtilHaveZXingCPPDecoder(void);
|
2022-04-10 22:12:18 +12:00
|
|
|
int testUtilCanZXingCPP(int index, const struct zint_symbol *symbol, const char *data, const int length,
|
|
|
|
const int debug);
|
|
|
|
int testUtilZXingCPP(int index, struct zint_symbol *symbol, const char *source, const int length, char *bits,
|
|
|
|
char *buffer, const int buffer_size, int *p_cmp_len);
|
Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
2022-05-10 06:50:50 +12:00
|
|
|
int testUtilZXingCPPSegs(int index, struct zint_symbol *symbol, const struct zint_seg segs[], const int seg_count, char *bits,
|
|
|
|
char *buffer, const int buffer_size, int *p_cmp_len);
|
2021-12-09 07:12:20 +13:00
|
|
|
int testUtilZXingCPPCmp(struct zint_symbol *symbol, char *msg, char *cmp_buf, int cmp_len,
|
|
|
|
const char *expected, int expected_len, const char *primary, char *ret_buf, int *p_ret_len);
|
Add multiple segments support for AZTEC, CODEONE, DATAMATRIX, DOTCODE,
GRIDMATRIX, HANXIN, MAXICODE, MICROPDF417, PDF417, QRCODE, RMQR, ULTRA
RMQR: fix ECI encoding (wrong bit length for indicator)
MICROQR: check versions M1 and M2 for allowed characters so as to give
better error messages
DOTCODE: some small optimizations
common.c: add is_chr(), segs_length(), segs_cpy()
CODEONE/CODE128/DOTCODE/GRIDMATRIX/HANXIN/MAXICODE/QRCODE/ULTRA: add
namespace prefixes to static funcs/data
includes: use Z_ prefix, unuse double underscore prefixes (guard defines)
manual.txt: compress some tables using double/treble column sets
2022-05-10 06:50:50 +12:00
|
|
|
int testUtilZXingCPPCmpSegs(struct zint_symbol *symbol, char *msg, char *cmp_buf, int cmp_len,
|
|
|
|
const struct zint_seg segs[], const int seg_count, const char *primary, char *ret_buf, int *p_ret_len);
|
2021-12-09 07:12:20 +13:00
|
|
|
|
2020-12-22 08:30:07 +13:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-04-10 22:12:18 +12:00
|
|
|
/* vim: set ts=4 sw=4 et : */
|
|
|
|
#endif /* Z_TESTCOMMON_H */
|