mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
#147 Datamatrix buffer test from Opaki; encode examples from ISO 16022
This commit is contained in:
parent
257da3fff5
commit
d513a68222
@ -33,6 +33,7 @@
|
||||
|
||||
//#define TEST_ENCODE_GENERATE_EXPECTED 1
|
||||
|
||||
// Note need ZINT_SANITIZE set for these
|
||||
static void test_buffer(void)
|
||||
{
|
||||
testStart("");
|
||||
@ -49,6 +50,7 @@ static void test_buffer(void)
|
||||
// s/\/\*[ 0-9]*\*\//\=printf("\/*%3d*\/", line(".") - line("'<"))
|
||||
struct item data[] = {
|
||||
/* 0*/ { "1", 16383, UNICODE_MODE, READER_INIT, 0, "" },
|
||||
/* 1*/ { "000106j 05 Galeria A Nação0000000000", 3, UNICODE_MODE, 0, 0, "From Okapi, consecutive use of upper shift; ticket #176" },
|
||||
};
|
||||
int data_size = sizeof(data) / sizeof(struct item);
|
||||
|
||||
@ -104,6 +106,44 @@ static void test_encode(void)
|
||||
"10011111000100"
|
||||
"11111111111111"
|
||||
},
|
||||
/* 1*/ { "A1B2C3D4E5F6G7H8I9J0K1L2", 0, 18, 18, "ISO 16022:2006 Figure 1",
|
||||
"101010101010101010"
|
||||
"101000101010001111"
|
||||
"101100000111000010"
|
||||
"100000101110100111"
|
||||
"100100000100011100"
|
||||
"101011111010101111"
|
||||
"100110011111110110"
|
||||
"110011101111111101"
|
||||
"111111111101111100"
|
||||
"101110110100101101"
|
||||
"100010110101001110"
|
||||
"101101111001100001"
|
||||
"110001101010011110"
|
||||
"110110100000100011"
|
||||
"101101001101011010"
|
||||
"100010011001011011"
|
||||
"100011000000100100"
|
||||
"111111111111111111"
|
||||
},
|
||||
/* 2*/ { "30Q324343430794<OQQ", 0, 16, 16, "ISO 16022:2006 Figure R.1",
|
||||
"1010101010101010"
|
||||
"1010101010000001"
|
||||
"1010101011101100"
|
||||
"1010101010110011"
|
||||
"1010101010001100"
|
||||
"1010101010001101"
|
||||
"1010101010000100"
|
||||
"1010101001101001"
|
||||
"1010101010000110"
|
||||
"1000001001011001"
|
||||
"1111111110000100"
|
||||
"1101100110010101"
|
||||
"1111111001100100"
|
||||
"1110010111100101"
|
||||
"1110010010100010"
|
||||
"1111111111111111"
|
||||
},
|
||||
};
|
||||
int data_size = sizeof(data) / sizeof(struct item);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user