From fe70911ea37b51ffb8c3612f5461a31fb3022e7e Mon Sep 17 00:00:00 2001 From: gitlost Date: Thu, 10 Dec 2020 19:48:52 +0000 Subject: [PATCH] QRCODE: fix dark mods count and percentage calc broken by [cd214a] --- backend/qr.c | 14 +-- backend/tests/data/print/bmp/qr_v1_m.bmp | Bin 398 -> 398 bytes backend/tests/data/print/emf/qr_v1_m.emf | Bin 2148 -> 2148 bytes backend/tests/data/print/eps/qr_v1_m.eps | 132 +++++++++++------------ backend/tests/data/print/gif/qr_v1_m.gif | Bin 247 -> 244 bytes backend/tests/data/print/pcx/qr_v1_m.pcx | Bin 2864 -> 2756 bytes backend/tests/data/print/png/qr_v1_m.png | Bin 287 -> 288 bytes backend/tests/data/print/svg/qr_v1_m.svg | 120 ++++++++++----------- backend/tests/data/print/tif/qr_v1_m.tif | Bin 5496 -> 5496 bytes backend/tests/data/print/txt/qr_v1_m.txt | 38 +++---- backend/tests/test_qr.c | 28 +++++ 11 files changed, 178 insertions(+), 154 deletions(-) diff --git a/backend/qr.c b/backend/qr.c index 68bc633a..4d8840f7 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -1069,6 +1069,7 @@ static int evaluate(unsigned char *local, const int size) { } /* Horizontal */ + dark_mods = 0; /* Count dark mods simultaneously (see Test 4 below) */ for (y = 0; y < size; y++) { r = y * size; block = 0; @@ -1083,6 +1084,9 @@ static int evaluate(unsigned char *local, const int size) { block = 1; state = local[r + x]; } + if (state) { + dark_mods++; + } } if (block >= 5) { result += block - 2; @@ -1097,7 +1101,6 @@ static int evaluate(unsigned char *local, const int size) { #endif /* Test 2: Block of modules in same color */ - dark_mods = 0; /* Count dark mods simultaneously (see Test 4 below) */ for (x = 0; x < size - 1; x++) { for (y = 0; y < size - 1; y++) { k = local[(y * size) + x]; @@ -1106,9 +1109,6 @@ static int evaluate(unsigned char *local, const int size) { (k == local[((y + 1) * size) + (x + 1)])) { result += 3; } - if (k) { - dark_mods++; - } } } @@ -1215,11 +1215,7 @@ static int evaluate(unsigned char *local, const int size) { /* Test 4: Proportion of dark modules in entire symbol */ percentage = (100.0 * dark_mods) / (size * size); - if (percentage < 50.0) { - k = (int) ceil(((100.0 - percentage) - 50.0) / 5.0); - } else { - k = (int) ceil((percentage - 50.0) / 5.0); - } + k = (int) (fabs(percentage - 50.0) / 5.0); result += 10 * k; diff --git a/backend/tests/data/print/bmp/qr_v1_m.bmp b/backend/tests/data/print/bmp/qr_v1_m.bmp index 8a43eacf65e0eaec2625ceb2f328c9a94834a929..c5da1ff50c153677dcb5ac0c6fc8af5651912406 100644 GIT binary patch literal 398 zcmYMvF$%*l3E=@jr98tC4u^-O}S0$-)z)u4V`Qe&_mKVNak>-|~MTu+>L z?1%3qc`;i%ZeVOxoe#8ERYrE1@}ALzRa&d)FOPjgUnSgWoxRDFn2|&6oyL7(N`f?& z*|g}FQ~KM=kw L`TM5!)9*KbN4AqD literal 398 zcmYMt!3x7L2nOJExe9rWu~VSevcm3rwLO#2tKh2?dKH|BN(1KOuZ@1bzopFcw)<)I zidsrEX4kKWF-leE2NgVE}@Qh{W>k0iIKe>>`wS J@2Wt|cmIikj%ok^ diff --git a/backend/tests/data/print/emf/qr_v1_m.emf b/backend/tests/data/print/emf/qr_v1_m.emf index eefe3b04badac409bd41975992d8672bc51750c7..069c0641be77abaa05c601d6a3c35a61d4a73dc8 100644 GIT binary patch literal 2148 zcmZA0TZ$Ax5QX6!Z^$5`A|fJEh&M*J;k^0o0(^AgKDdWAzOoLSsf3_2{yrITGP3(> zt@V2%>t;40>+gfL#PaqJpb)SU+3wYPrB#kBjSgiPM_vE&u??S>GgFsb<7RFnP~l_ zyUtA2jNS~KcZcR`;DV>1 zYHl|1)O9dH+j<&&J8?d7b89_6a(&PBar1BPp13;AbDm$b%e~Ado|+Hdb?$Ap(W{f$ zH^&6l+`VwVnoqjt{x7~ueRHSNx4ApvylxZG+vDEdK0N)*p}F^#Ur+EBeSYKKK&^1z zw~6!!H+Nk9)~h4W+eFVdu8y%~O}p=IY4#>^bv^tJfS8 aSo2Bu+(!C_-umdwr+IX~xBp4^oX4|II{!7#|LQk4H~Q-nHwQX?t+U@*?zvf;QMei8 zpXPkv`Zw1XH@D{M$jw0S)ThNob8F1GH-C3<`)WSvp7YOJ>ZhMR&C?HSZa?apXLI|) zw-e_Fe}CfcC(dWri9hquD?W2~oLO^c<^Rk&dQ6y4>*GV;=9BKZ{`QtS@u7e7_|U(3 zeCTZ^siT*mZ61HyiMt>4=G681m;2szCf##>)J$LJn6qgfe|j{JKmRn}jyn1`=a1Gr zw~6$f<*qYNns9UTKcCIb4RGj3+rq_q(Jl1~!zj!;` diff --git a/backend/tests/data/print/eps/qr_v1_m.eps b/backend/tests/data/print/eps/qr_v1_m.eps index 5c138d3e..07313119 100644 --- a/backend/tests/data/print/eps/qr_v1_m.eps +++ b/backend/tests/data/print/eps/qr_v1_m.eps @@ -17,9 +17,9 @@ TE 0.00 0.00 0.00 setrgbcolor 2.00 40.00 TB 0.00 14.00 TR TE -2.00 40.00 TB 20.00 2.00 TR +2.00 40.00 TB 16.00 2.00 TR TE -2.00 40.00 TB 24.00 2.00 TR +2.00 40.00 TB 22.00 4.00 TR TE 2.00 40.00 TB 28.00 14.00 TR TE @@ -27,147 +27,147 @@ TE TE 10.00 30.00 TB 12.00 2.00 TR TE +2.00 38.00 TB 18.00 2.00 TR +TE +2.00 38.00 TB 24.00 2.00 TR +TE 10.00 30.00 TB 28.00 2.00 TR TE 10.00 30.00 TB 40.00 2.00 TR TE 6.00 32.00 TB 4.00 6.00 TR TE -10.00 28.00 TB 16.00 2.00 TR +2.00 36.00 TB 16.00 2.00 TR TE -2.00 36.00 TB 20.00 2.00 TR +2.00 36.00 TB 22.00 2.00 TR TE 6.00 32.00 TB 32.00 6.00 TR TE -2.00 34.00 TB 22.00 2.00 TR +2.00 34.00 TB 18.00 2.00 TR TE -2.00 32.00 TB 20.00 2.00 TR +6.00 30.00 TB 22.00 4.00 TR TE -2.00 32.00 TB 24.00 2.00 TR -TE -2.00 30.00 TB 22.00 2.00 TR +2.00 30.00 TB 16.00 4.00 TR TE 2.00 28.00 TB 0.00 14.00 TR TE +2.00 28.00 TB 16.00 2.00 TR +TE 2.00 28.00 TB 20.00 2.00 TR TE -2.00 28.00 TB 24.00 2.00 TR +4.00 26.00 TB 24.00 2.00 TR TE 2.00 28.00 TB 28.00 14.00 TR TE -2.00 26.00 TB 16.00 4.00 TR +4.00 22.00 TB 0.00 2.00 TR TE -2.00 24.00 TB 0.00 2.00 TR +4.00 22.00 TB 4.00 2.00 TR TE -2.00 24.00 TB 4.00 10.00 TR +2.00 24.00 TB 12.00 4.00 TR TE -2.00 24.00 TB 22.00 2.00 TR +2.00 24.00 TB 20.00 2.00 TR TE -2.00 24.00 TB 28.00 10.00 TR +2.00 24.00 TB 30.00 2.00 TR TE -2.00 22.00 TB 4.00 6.00 TR +2.00 24.00 TB 36.00 2.00 TR TE -2.00 22.00 TB 16.00 2.00 TR +2.00 24.00 TB 40.00 2.00 TR TE -2.00 22.00 TB 20.00 10.00 TR +4.00 20.00 TB 8.00 2.00 TR TE -2.00 22.00 TB 34.00 8.00 TR +2.00 22.00 TB 16.00 8.00 TR TE -2.00 20.00 TB 0.00 2.00 TR +2.00 22.00 TB 26.00 6.00 TR TE -2.00 20.00 TB 10.00 6.00 TR +2.00 22.00 TB 34.00 2.00 TR TE -2.00 20.00 TB 18.00 4.00 TR +2.00 22.00 TB 38.00 4.00 TR TE -2.00 20.00 TB 24.00 2.00 TR +2.00 20.00 TB 0.00 6.00 TR TE -2.00 20.00 TB 28.00 4.00 TR +2.00 20.00 TB 12.00 2.00 TR TE -2.00 20.00 TB 34.00 2.00 TR +2.00 20.00 TB 16.00 4.00 TR TE -2.00 20.00 TB 40.00 2.00 TR +2.00 20.00 TB 22.00 6.00 TR TE -2.00 18.00 TB 2.00 2.00 TR +2.00 20.00 TB 30.00 4.00 TR TE -2.00 18.00 TB 8.00 4.00 TR +2.00 20.00 TB 38.00 2.00 TR +TE +4.00 16.00 TB 0.00 4.00 TR +TE +2.00 18.00 TB 6.00 6.00 TR TE 2.00 18.00 TB 14.00 2.00 TR TE -2.00 18.00 TB 22.00 8.00 TR +4.00 16.00 TB 18.00 2.00 TR TE -2.00 18.00 TB 36.00 6.00 TR +2.00 18.00 TB 22.00 2.00 TR TE -2.00 16.00 TB 0.00 2.00 TR +2.00 18.00 TB 26.00 6.00 TR TE -2.00 16.00 TB 4.00 4.00 TR +2.00 18.00 TB 38.00 4.00 TR TE -2.00 16.00 TB 12.00 2.00 TR +2.00 16.00 TB 6.00 10.00 TR TE -4.00 14.00 TB 16.00 6.00 TR +2.00 16.00 TB 22.00 14.00 TR TE -4.00 14.00 TB 24.00 2.00 TR +2.00 16.00 TB 40.00 2.00 TR TE -4.00 14.00 TB 30.00 2.00 TR +2.00 14.00 TB 16.00 2.00 TR TE -2.00 16.00 TB 38.00 2.00 TR -TE -2.00 14.00 TB 36.00 2.00 TR +2.00 14.00 TB 20.00 2.00 TR TE 2.00 12.00 TB 0.00 14.00 TR TE -2.00 12.00 TB 18.00 2.00 TR +2.00 12.00 TB 16.00 6.00 TR TE -2.00 12.00 TB 22.00 2.00 TR +2.00 12.00 TB 28.00 2.00 TR TE -2.00 12.00 TB 26.00 2.00 TR -TE -2.00 12.00 TB 32.00 4.00 TR -TE -4.00 10.00 TB 40.00 2.00 TR +2.00 12.00 TB 38.00 2.00 TR TE 10.00 2.00 TB 0.00 2.00 TR TE 10.00 2.00 TB 12.00 2.00 TR TE -4.00 8.00 TB 16.00 4.00 TR +2.00 10.00 TB 24.00 2.00 TR TE -2.00 10.00 TB 30.00 4.00 TR +2.00 10.00 TB 32.00 2.00 TR TE -2.00 10.00 TB 36.00 2.00 TR +2.00 10.00 TB 40.00 2.00 TR TE 6.00 4.00 TB 4.00 6.00 TR TE -2.00 8.00 TB 22.00 2.00 TR +2.00 8.00 TB 18.00 4.00 TR TE -2.00 8.00 TB 26.00 2.00 TR +2.00 8.00 TB 28.00 2.00 TR TE -2.00 8.00 TB 32.00 6.00 TR +2.00 8.00 TB 36.00 6.00 TR TE -2.00 6.00 TB 16.00 2.00 TR +2.00 6.00 TB 18.00 6.00 TR TE -2.00 6.00 TB 20.00 12.00 TR +2.00 6.00 TB 26.00 4.00 TR TE -4.00 4.00 TB 34.00 4.00 TR +2.00 6.00 TB 34.00 2.00 TR TE -2.00 4.00 TB 16.00 6.00 TR +2.00 4.00 TB 16.00 4.00 TR TE -2.00 4.00 TB 24.00 2.00 TR +2.00 4.00 TB 22.00 6.00 TR TE -2.00 4.00 TB 28.00 4.00 TR +2.00 4.00 TB 30.00 4.00 TR TE -2.00 2.00 TB 18.00 2.00 TR +2.00 4.00 TB 36.00 6.00 TR TE -2.00 2.00 TB 22.00 10.00 TR +2.00 2.00 TB 22.00 2.00 TR TE -2.00 2.00 TB 36.00 4.00 TR +2.00 2.00 TB 26.00 4.00 TR +TE +2.00 2.00 TB 38.00 2.00 TR TE 2.00 0.00 TB 0.00 14.00 TR TE 2.00 0.00 TB 16.00 2.00 TR TE -2.00 0.00 TB 24.00 2.00 TR -TE -2.00 0.00 TB 30.00 2.00 TR -TE -2.00 0.00 TB 36.00 2.00 TR +2.00 0.00 TB 20.00 22.00 TR TE diff --git a/backend/tests/data/print/gif/qr_v1_m.gif b/backend/tests/data/print/gif/qr_v1_m.gif index e838588323a27a18a8fe5a7afbbc84853a7cc240..6e61e093e018883223ef915d9ab3dedb1caad663 100644 GIT binary patch delta 222 zcmV<403rYP0rUZo9)Ht>j~HRQ%95NEJnLYcu4jC8P2_n{8Ga%*qR}X&Evdf81t&5{ z@7it4t#GX3FZUbTe86Lqw-N@8RB0(WCAyf}9_sX^c4ya(jwUs$&*^Gq3pYXIbUHb1 z{mkwuuD9DKr-XG!LDWV#XPAZd);Pun#MB1qH29P_smQ@d$yXQ^xrk&2IvUfcrd0R1 z+FBOqy5{y8cIbGjD)^`CQn<-i)4N$_S_Dd4iurWRs~5WLJesQ+cnaog>u0U(ggCo2 Y1q@pQb_oY8T^r6>EbDH(E?WQqJB1W&6951J delta 225 zcmV<703QGJ0rvrr9)H$^j~L6g9+I3CvIt(rHQkSaVmNZ!XqB3(n9#eWs~aC$3(psf z+w`0Y)_Oc&u5ltsZbM@Y`23le$7*yrEgf|vl+Vi*vN|5+m5lB|sTCEd<&MkY@^=$! z-?fo!x?WG=D5P1q}LSYE9`|S}poK b?J6S6$jPPpd^lMyW2-zXO&a#TPyhfswIgjJ diff --git a/backend/tests/data/print/pcx/qr_v1_m.pcx b/backend/tests/data/print/pcx/qr_v1_m.pcx index ba1f2d120b7e00cefcfa2ed674e9522c8e71c25d..2da2ec6885e639a5c49c837be7dc7cff51f027d5 100644 GIT binary patch literal 2756 zcmd5;?Fxf146Ka7*qdzl{tpmD#2@01G4?iHE@!QbF(%j#McZDmxh9v^>$$l&y>5E9 zP1~Tq>pI=t{*R)E$%z-&`A*x(9WxR)+MJkIY<`S$qvCt>&GiK?3#OKut&AITg7|%M zuG2c0hQ9GFXEEIwFUB(JP%@#cDCQBd2{o1id8t}v|N9LN;(A>@R5a)lYP1#$`3+I` z$ds`zX^Fc9m4h*3xYnn}vb+sC-*N?~p82lAGAavjnoM_Kn+BQ9i@1m1-$TtJW~>iz zJ$B5K5PK1P;7N%DJ>ZO|Kh=k=2${%@#=5a}FIw%aWj*D@xAkgqTH{jA0$pHV1_QQK QM_MeLQ_tleQ2hVBH!1H|4*&oF literal 2864 zcmd5-Q3}H#3{4q>v72o4{s$0|Qik+v*Kv6!Rm<3*ptT*g`qI_-@{-)I!;ScQ@NXQ( z0rOqgznl`K+Rg zRUf~&&TpOVji|qZ-KNlD-0XdfW0<-myC0Kfg|99*-(-coXs~&5vE$5+R zCcZxLsJk}oJ5*+sMR~@|>2Hawibsym?zARZ^|l!n`6#Og=DDt0jk9EDKiiV{SaYu( z;`Pi@yAT1K`&d-_AMZUUy|O>j6%RvGzbSk`R+f6n`Gm;ywjpM(FHK9;?15`ni~MbK cY0GUN8@iXo5*1gfPkT(d7-|gmmT?630mfsgWdHyG diff --git a/backend/tests/data/print/png/qr_v1_m.png b/backend/tests/data/print/png/qr_v1_m.png index c150041b86df8ca68c969355eb18406dbddfe4b4..aa017053414400ea9fda4c45adf90eddc55719df 100644 GIT binary patch delta 260 zcmV+f0sH=+0-yqrB!A~gL_t(o!_`;Y3dJx8)5HG%m%E3;5K4j`2QxmE(MjVaQMa_M zwam=jpYyi;<-C)zpM7dqd^IwJZ=Vt3jL#Y9Pm~A&%00r$eNIB(uYaEJsg?g<4Ei<+ zeFoFX0i8I_K%Zx6RR5=kjL(nJ`&%_E+4s)5j8}Vx?a}>tihYOPj%FK#iF=E86#5?J zIHExl5&w5aiaV1qpV9#I|Z4q)^?0L8QLet!cUJmgoRvmDU?0000< KMNUMnLSTY>T!DcA delta 259 zcmV+e0sQ`;0-pkqB!A{fL_t(o!`)cR3V<*Sv*Q2%@;nGKED7m$SY}T$N@GbmG2xt_mZa1F3 z@%1mr@}5^t?tti - - + + + + - - + + - - - - + + + + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + - - - - - + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + + - - - + diff --git a/backend/tests/data/print/tif/qr_v1_m.tif b/backend/tests/data/print/tif/qr_v1_m.tif index 0b21536e4c9e24a674109749e2dd1e6354bf302a..6ebd18e5630cecee051e35eec52326ea2c13b300 100644 GIT binary patch literal 5496 zcmchbO-ch{5JYDZm8=B8D5wXJoWxwil}iui((|cbrYG>AsHW#9Mi|TL>Q_BkdORMw z@B41T=XdzTLTEblCqT<`#8in53hA?9#6|Ig_+J zS?SVD&Yaqw^Yf|e;uf!^A6lI}&*@t2dWn*GCvQ++9Y59${WPx2SnT_&QZbx16I)N7H05UEWQZ zSEf#RIhowmEl#;bUCI1Ud;JoZ%zeH^Br?s6$baZNqxRAr}|#JFrSi>>&vz4g>>?F z;Z@wK_)Ey_a-7`fG&G;?e$CV`;cjTQa7thK+|?-^a>yqk_esl>WU`k8^>Ze7^W^2) z*~|NL-z9k`3F<3B9o=#cyMp7MBxr`y3RCmSq{BS@(45X|=a$oXm)ly)zeM|O_tRZ< z{rSXxJLp6EyNBL1y=~t6zU#K5f7-bj^`_~&J~+Fk_oIK>c^Lf@^KsN)?Z2c?{q@lG b(U{Mp{%raM{8#YXdbb;X-kLhKpMU=WR>|Sb literal 5496 zcmdUzK}rKb6hwOxm8=B8D5wXJoWxwil}iui((@U6(j9nE)aTDIvq%DMrKbL?-?Q|1 zJe1$ZGU0QQPaAHw>IvvXRLW1<$W0Q+9#JwKw$OJvljm-Z)BFsLgiK!B>5!1ou03Wd znR>=Gp7=j;S=4RC2~4&2^E(Jbl#}hqPtem8Sb#OMBZ~Pj^SXsdF5YWX&i|^BG6U zZ7P4pn{bCbGoM_eUEfLUaN9V!#?xin8?Eh0vTAo15~gxEtBrKlXeX0h+)6X^?ilmq zr);FwDc#&s4*-vBe}yGHu! zwUexxo4bA7l+L!~RL;Dqd^`7p`i9voBiE~%TSqcl1s>uzx}?jl*WlCQm;cjWD; z^^MVCk~&W&O?B+Bv1xabqf_mvJIQ25IZRTo-OjC?j<=0BbhEBYeMfM9W}o}=S8mF1 zDI2zDeWV57@*>-=Nx$AmU^~2COyQ=ryA7`GrKQf=Y{;B^ZeHm`gU0;>? Y+VywUZ{WX!U&qVt{QanEY`^^d2fdpStN;K2 diff --git a/backend/tests/data/print/txt/qr_v1_m.txt b/backend/tests/data/print/txt/qr_v1_m.txt index d805bbe1..13815713 100644 --- a/backend/tests/data/print/txt/qr_v1_m.txt +++ b/backend/tests/data/print/txt/qr_v1_m.txt @@ -1,21 +1,21 @@ -FE 2B F8 -82 02 08 -BA A2 E8 +FE 9B F8 +82 4A 08 BA 92 E8 -BA AA E8 -82 92 08 +BA 5A E8 +BA 1A E8 +82 DA 08 FE AB F8 -00 C0 00 -BE 13 E0 -38 BE 78 -87 6B 48 -4D 1E 38 -B2 E9 10 -00 E9 20 -FE 54 C8 -82 C1 A8 -BA D4 E0 -BA BF 60 -BA EB 60 -82 5F 30 -FE 89 20 +00 08 00 +A3 21 28 +A8 F7 58 +EA DD 90 +DD 57 18 +DF 5F C8 +00 A0 00 +FE E2 10 +82 08 88 +BA 62 38 +BA 76 40 +BA DD B8 +82 16 10 +FE BF F8 diff --git a/backend/tests/test_qr.c b/backend/tests/test_qr.c index 961cc06b..cca27946 100644 --- a/backend/tests/test_qr.c +++ b/backend/tests/test_qr.c @@ -87,6 +87,7 @@ static void test_qr_options(int index, int debug) { for (int i = 0; i < data_size; i++) { if (index != -1 && i != index) continue; + if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d\n", i); struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); @@ -242,6 +243,7 @@ static void test_qr_input(int index, int generate, int debug) { for (int i = 0; i < data_size; i++) { if (index != -1 && i != index) continue; + if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d\n", i); struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); @@ -302,6 +304,7 @@ static void test_qr_gs1(int index, int generate, int debug) { for (int i = 0; i < data_size; i++) { if (index != -1 && i != index) continue; + if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d\n", i); struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); @@ -380,6 +383,7 @@ static void test_qr_optimize(int index, int generate, int debug) { for (int i = 0; i < data_size; i++) { if (index != -1 && i != index) continue; + if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d\n", i); struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n"); @@ -1195,12 +1199,36 @@ static void test_qr_encode(int index, int generate, int debug) { "100000100100111010000" "111111100011001000110" }, + /* 19*/ { BARCODE_QRCODE, UNICODE_MODE, 2, 1, -1, "1234567890", 0, 21, 21, "test_print example, automatic mask 001 (same score as mask 010)", + "111111101001101111111" + "100000100100101000001" + "101110101001001011101" + "101110100101101011101" + "101110100001101011101" + "100000101101101000001" + "111111101010101111111" + "000000000000100000000" + "101000110010000100101" + "101010001111011101011" + "111010101101110110010" + "110111010101011100011" + "110111110101111111001" + "000000001010000000000" + "111111101110001000010" + "100000100000100010001" + "101110100110001000111" + "101110100111011001000" + "101110101101110110111" + "100000100001011000010" + "111111101011111111111" + }, }; int data_size = ARRAY_SIZE(data); for (int i = 0; i < data_size; i++) { if (index != -1 && i != index) continue; + if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d\n", i); struct zint_symbol *symbol = ZBarcode_Create(); assert_nonnull(symbol, "Symbol not created\n");