ZXing QR decoder ported to pure xTalk · target: a 9.6.3-class xTalk engine · image/imageData probe →
✓ 45 / 45 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| u32 in-range | 5 | 5 | PASS |
| u32 zero | 0 | 0 | PASS |
| u32 -1 -> 0xFFFFFFFF | 4294967295 | 4294967295 | PASS |
| u32 -16777216 -> 0xFF000000 | 4278190080 | 4278190080 | PASS |
| u32 2^32 -> 0 | 0 | 0 | PASS |
| u32 already-max | 4294967295 | 4294967295 | PASS |
| u8 300 | 44 | 44 | PASS |
| u8 255 | 255 | 255 | PASS |
| u8 256 | 0 | 0 | PASS |
| shl 1<<0 | 1 | 1 | PASS |
| shl 1<<5 | 32 | 32 | PASS |
| shl 1<<31 | 2147483648 | 2147483648 | PASS |
| shl 255<<24 | 4278190080 | 4278190080 | PASS |
| shl 0xFFFFFFFF<<1 (low bits survive) | 4294967294 | 4294967294 | PASS |
| uShr 0xFF000000>>>24 | 255 | 255 | PASS |
| uShr 1>>>1 | 0 | 0 | PASS |
| uShr 0xFFFFFFFF>>>28 | 15 | 15 | PASS |
| uShr x>>>0 | 12345 | 12345 | PASS |
| aShr positive | 127 | 127 | PASS |
| aShr -16777216>>24 = -1 | 4294967295 | 4294967295 | PASS |
| aShr -1>>1 = -1 | 4294967295 | 4294967295 | PASS |
| aShr -2>>1 = -1 | 4294967295 | 4294967295 | PASS |
| ntz 0 | 32 | 32 | PASS |
| ntz 1 | 0 | 0 | PASS |
| ntz 8 | 3 | 3 | PASS |
| ntz 6 | 1 | 1 | PASS |
| ntz 96 | 5 | 5 | PASS |
| ntz 0x80000000 | 31 | 31 | PASS |
| hashCode empty | 0 | 0 | PASS |
| hashCode a | 97 | 97 | PASS |
| hashCode ab | 3105 | 3105 | PASS |
| hashCode abc | 96354 | 96354 | PASS |
| f2ib 0.0 | 0 | 0 | PASS |
| f2ib 1.0 | 1065353216 | 1065353216 | PASS |
| f2ib 2.0 | 1073741824 | 1073741824 | PASS |
| f2ib -1.0 | 3212836864 | 3212836864 | PASS |
| byteAt A@0 | 65 | 65 | PASS |
| byteAt C@2 | 67 | 67 | PASS |
| fill_array size 3 | 3 | 3 | PASS |
| fill_array value | 0 | 0 | PASS |
| fill_array quirk size 1 | 1 | 1 | PASS |
| fill_array quirk value | 7 | 7 | PASS |
| arraycopy dst[5] | 11 | 11 | PASS |
| arraycopy dst[6] | 12 | 12 | PASS |
| arraycopy count | 2 | 2 | PASS |
✓ 27 / 27 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| gf_exp 0 | 1 | 1 | PASS |
| gf_exp 1 | 2 | 2 | PASS |
| gf_exp 7 | 128 | 128 | PASS |
| gf_exp 8 (wrap via primitive) | 29 | 29 | PASS |
| gf_exp 12 | 205 | 205 | PASS |
| gf_exp 254 | 142 | 142 | PASS |
| gf_exp 255 (period) | 1 | 1 | PASS |
| gf_log 1 | 0 | 0 | PASS |
| gf_log 2 | 1 | 1 | PASS |
| gf_log 29 | 8 | 8 | PASS |
| gf_log 142 | 254 | 254 | PASS |
| gf_addOrSubtract 5,3 | 6 | 6 | PASS |
| gf_addOrSubtract 255,255 | 0 | 0 | PASS |
| gf_addOrSubtract 0,123 | 123 | 123 | PASS |
| gf_multiply 0,5 | 0 | 0 | PASS |
| gf_multiply 5,0 | 0 | 0 | PASS |
| gf_multiply 1,5 | 5 | 5 | PASS |
| gf_multiply 2,2 | 4 | 4 | PASS |
| gf_multiply 2,4 | 8 | 8 | PASS |
| gf_multiply 128,2 | 29 | 29 | PASS |
| gf_multiply 3,3 ((x+1)^2=x^2+1) | 5 | 5 | PASS |
| gf_multiply 2,142 (=1) | 1 | 1 | PASS |
| gf_inverse 1 | 1 | 1 | PASS |
| gf_inverse 2 | 142 | 142 | PASS |
| gf_multiply 7,inv(7) | 1 | 1 | PASS |
| gf_multiply 200,inv(200) | 1 | 1 | PASS |
| gf_multiply 255,inv(255) | 1 | 1 | PASS |
✓ 36 / 36 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| poly_isZero(zero) | true | true | PASS |
| poly_isZero(one) | false | false | PASS |
| poly_degree(one) | 0 | 0 | PASS |
| poly_new strip length | 2 | 2 | PASS |
| poly_new strip [0] | 5 | 5 | PASS |
| poly_new strip [1] | 3 | 3 | PASS |
| poly_new all-zero length | 1 | 1 | PASS |
| poly_new all-zero isZero | true | true | PASS |
| poly_degree | 2 | 2 | PASS |
| getCoefficient x^2 | 1 | 1 | PASS |
| getCoefficient x^1 | 2 | 2 | PASS |
| getCoefficient x^0 | 3 | 3 | PASS |
| evaluateAt 0 | 3 | 3 | PASS |
| evaluateAt 1 (1^2^3) | 0 | 0 | PASS |
| evaluateAt 2 | 3 | 3 | PASS |
| add length | 3 | 3 | PASS |
| add [0] | 1 | 1 | PASS |
| add [1] | 0 | 0 | PASS |
| add [2] | 0 | 0 | PASS |
| add self -> zero | true | true | PASS |
| mul length | 3 | 3 | PASS |
| mul [0] | 1 | 1 | PASS |
| mul [1] | 0 | 0 | PASS |
| mul [2] | 1 | 1 | PASS |
| scalar [0] | 2 | 2 | PASS |
| scalar [1] | 4 | 4 | PASS |
| scalar [2] | 6 | 6 | PASS |
| scalar by 0 -> zero | true | true | PASS |
| monomial length | 5 | 5 | PASS |
| monomial [0] | 1 | 1 | PASS |
| monomial [3] | 0 | 0 | PASS |
| monomial [4] | 0 | 0 | PASS |
| divide quotient len | 2 | 2 | PASS |
| divide quotient [0] | 1 | 1 | PASS |
| divide quotient [1] | 1 | 1 | PASS |
| divide remainder isZero | true | true | PASS |
✓ 6 / 6 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| codeword length | 26 | 26 | PASS |
| clean: unchanged | true | true | PASS |
| 1 error corrected | true | true | PASS |
| 3 errors corrected | true | true | PASS |
| 5 errors (max) corrected | true | true | PASS |
| 6 errors not silently fixed | true | true | PASS |
✓ 27 / 27 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| new size | 20 | 20 | PASS |
| sizeInBytes (20->3) | 3 | 3 | PASS |
| get(0) | true | true | PASS |
| get(1) | false | false | PASS |
| get(19) | true | true | PASS |
| nextSet(0) | 0 | 0 | PASS |
| nextSet(1) | 19 | 19 | PASS |
| nextUnset(0) | 1 | 1 | PASS |
| nextSet none -> size | 20 | 20 | PASS |
| range get(3) | false | false | PASS |
| range get(4) | true | true | PASS |
| range get(7) | true | true | PASS |
| range get(8) | false | false | PASS |
| isRange 4..8 true | true | true | PASS |
| isRange 4..9 true | false | false | PASS |
| isRange 0..4 false | true | true | PASS |
| append size | 8 | 8 | PASS |
| append get(0)=1 | true | true | PASS |
| append get(1)=0 | false | false | PASS |
| append get(2)=1 | true | true | PASS |
| toBytes round-trip | 181 | 181 | PASS |
| xor -> 0xFFFFFFFF | 4294967295 | 4294967295 | PASS |
| reverse bit0 -> bit7 | true | true | PASS |
| reverse old bit0 clear | false | false | PASS |
| reverse word value | 128 | 128 | PASS |
| clone keeps bit3 | true | true | PASS |
| clone unaffected by bit4 | false | false | PASS |
✓ 36 / 36 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| square width | 21 | 21 | PASS |
| square height | 21 | 21 | PASS |
| square rowSize | 1 | 1 | PASS |
| rect rowSize (33->2) | 2 | 2 | PASS |
| rect bits count | 20 | 20 | PASS |
| get(5,3) | true | true | PASS |
| get(6,3) | false | false | PASS |
| get(5,4) | false | false | PASS |
| after unset | false | false | PASS |
| after flip on | true | true | PASS |
| after flip off | false | false | PASS |
| cross-word get(32,0) | true | true | PASS |
| cross-word get(31,0) | false | false | PASS |
| region (1,1) | true | true | PASS |
| region (2,2) | true | true | PASS |
| region (3,1) off | false | false | PASS |
| region (0,0) off | false | false | PASS |
| encl left | 1 | 1 | PASS |
| encl top | 1 | 1 | PASS |
| encl width | 2 | 2 | PASS |
| encl height | 2 | 2 | PASS |
| topLeft x | 1 | 1 | PASS |
| topLeft y | 1 | 1 | PASS |
| bottomRight x | 2 | 2 | PASS |
| bottomRight y | 2 | 2 | PASS |
| encl empty | | | PASS |
| topLeft empty | | | PASS |
| getRow bit0 | true | true | PASS |
| getRow bit32 | true | true | PASS |
| getRow bit1 | false | false | PASS |
| setRow bit0 | true | true | PASS |
| setRow bit32 | true | true | PASS |
| rotate180 (0,0)->(3,3) | true | true | PASS |
| rotate180 old (0,0) clear | false | false | PASS |
| clone keeps (2,2) | true | true | PASS |
| clone unaffected (3,3) | false | false | PASS |
✓ 13 / 13 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| available start | 24 | 24 | PASS |
| read nibble A | 10 | 10 | PASS |
| read nibble B | 11 | 11 | PASS |
| read byte CD | 205 | 205 | PASS |
| available mid | 8 | 8 | PASS |
| read byte EF | 239 | 239 | PASS |
| available end | 0 | 0 | PASS |
| cross nibble A | 10 | 10 | PASS |
| cross byte BC | 188 | 188 | PASS |
| read 16 = 0xABCD | 43981 | 43981 | PASS |
| first bit of 0x80 | 1 | 1 | PASS |
| second bit of 0x80 | 0 | 0 | PASS |
| over-read throws | true | true | PASS |
✓ 24 / 24 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| grey -> r | 128 | 128 | PASS |
| red 255,0,0 -> 63 | 63 | 63 | PASS |
| green 0,255,0 -> 127 | 127 | 127 | PASS |
| blue 0,0,255 -> 63 | 63 | 63 | PASS |
| white -> 255 | 255 | 255 | PASS |
| black -> 0 | 0 | 0 | PASS |
| width | 2 | 2 | PASS |
| height | 2 | 2 | PASS |
| lum[0]=255 | 255 | 255 | PASS |
| lum[1]=0 | 0 | 0 | PASS |
| lum[2]=100 | 100 | 100 | PASS |
| lum count | 4 | 4 | PASS |
| row1[0]=100 | 100 | 100 | PASS |
| row1[1]=100 | 100 | 100 | PASS |
| matrix[1]=0 | 0 | 0 | PASS |
| crop width | 1 | 1 | PASS |
| crop[0]=0 | 0 | 0 | PASS |
| crop[1]=100 | 100 | 100 | PASS |
| downsample width | 2 | 2 | PASS |
| downsample height | 2 | 2 | PASS |
| downsample (0,0)=0 | 0 | 0 | PASS |
| downsample (2,0)=2 | 2 | 2 | PASS |
| downsample (0,2)=32 | 32 | 32 | PASS |
| downsample (2,2)=34 | 34 | 34 | PASS |
✓ 13 / 13 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| estimateBlackPoint bimodal = 168 | 168 | 168 | PASS |
| estimateBlackPoint flat throws | true | true | PASS |
| ghb white pixel (5,10) not black | false | false | PASS |
| ghb black pixel (30,10) black | true | true | PASS |
| ghb white pixel (19,39) not black | false | false | PASS |
| ghb black pixel (20,0) black | true | true | PASS |
| ghb all-black throws NotFound | true | true | PASS |
| hybrid<40 white (2,2) not black | false | false | PASS |
| hybrid<40 black (27,27) black | true | true | PASS |
| hybrid deep-white (8,40) not black | false | false | PASS |
| hybrid deep-black (72,40) black | true | true | PASS |
| hybrid matrix width | 80 | 80 | PASS |
| hybrid matrix height | 80 | 80 | PASS |
✓ 69 / 69 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| ecl_name 0=L | L | L | PASS |
| ecl_name 1=M | M | M | PASS |
| ecl_name 2=Q | Q | Q | PASS |
| ecl_name 3=H | H | H | PASS |
| ecl_bits L=01 | 1 | 1 | PASS |
| ecl_bits M=00 | 0 | 0 | PASS |
| ecl_bits H=10 | 2 | 2 | PASS |
| ecl_bits Q=11 | 3 | 3 | PASS |
| ecl_forBits 00=M | 1 | 1 | PASS |
| ecl_forBits 01=L | 0 | 0 | PASS |
| ecl_forBits 10=H | 3 | 3 | PASS |
| ecl_forBits 11=Q | 2 | 2 | PASS |
| mode 1=NUMERIC | NUMERIC | NUMERIC | PASS |
| mode 2=ALPHANUMERIC | ALPHANUMERIC | ALPHANUMERIC | PASS |
| mode 4=BYTE | BYTE | BYTE | PASS |
| mode 8=KANJI | KANJI | KANJI | PASS |
| mode 13=HANZI | HANZI | HANZI | PASS |
| mode 0=TERMINATOR | TERMINATOR | TERMINATOR | PASS |
| mode 7=ECI | ECI | ECI | PASS |
| ccBits NUMERIC v1 | 10 | 10 | PASS |
| ccBits NUMERIC v10 | 12 | 12 | PASS |
| ccBits NUMERIC v27 | 14 | 14 | PASS |
| ccBits ALPHANUMERIC v1 | 9 | 9 | PASS |
| ccBits ALPHANUMERIC v40 | 13 | 13 | PASS |
| ccBits BYTE v1 | 8 | 8 | PASS |
| ccBits BYTE v10 | 16 | 16 | PASS |
| ccBits KANJI v1 | 8 | 8 | PASS |
| ccBits KANJI v27 | 12 | 12 | PASS |
| ccBits TERMINATOR | 0 | 0 | PASS |
| mode 6 throws | true | true | PASS |
| mask0 (0,0) | true | true | PASS |
| mask0 (0,1) | false | false | PASS |
| mask1 (0,j) | true | true | PASS |
| mask1 (1,j) | false | false | PASS |
| mask2 (i,0) | true | true | PASS |
| mask2 (i,1) | false | false | PASS |
| mask3 (0,0) | true | true | PASS |
| mask3 (1,1) | false | false | PASS |
| mask4 (0,0) | true | true | PASS |
| mask5 (0,0) | true | true | PASS |
| mask5 (1,1) | false | false | PASS |
| mask6 (0,0) | true | true | PASS |
| mask6 (1,1) | true | true | PASS |
| mask7 (0,0) | true | true | PASS |
| unmask involution keeps (3,4) | true | true | PASS |
| unmask involution (5,5) off | false | false | PASS |
| fmt exact: ecLevel M | 1 | 1 | PASS |
| fmt exact: dataMask 0 | 0 | 0 | PASS |
| fmt 597 ecLevel H(3) | 3 | 3 | PASS |
| fmt 597 dataMask 5 | 5 | 5 | PASS |
| fmt 1-bit err ecLevel M | 1 | 1 | PASS |
| fmt 1-bit err dataMask 0 | 0 | 0 | PASS |
| v1 dimension 21 | 21 | 21 | PASS |
| v7 dimension 45 | 45 | 45 | PASS |
| v40 dimension 177 | 177 | 177 | PASS |
| v1 align empty | | | PASS |
| v2 align 6,18 | 6,18 | 6,18 | PASS |
| v7 align 6,22,38 | 6,22,38 | 6,22,38 | PASS |
| v1-L ecw 7 | 7 | 7 | PASS |
| v1-H ecw 17 | 17 | 17 | PASS |
| v1-L data 19 | 19 | 19 | PASS |
| v1-M data 16 | 16 | 16 | PASS |
| v1-H data 9 | 9 | 9 | PASS |
| v5-Q data 62 | 62 | 62 | PASS |
| provVer dim 21 = 1 | 1 | 1 | PASS |
| provVer dim 45 = 7 | 7 | 7 | PASS |
| decodeVer 31892 = 7 | 7 | 7 | PASS |
| decodeVer 31892^7 = 7 | 7 | 7 | PASS |
| decodeVer 167017 = 40 | 40 | 40 | PASS |
✓ 23 / 23 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| db block count | 4 | 4 | PASS |
| db block0 numData | 15 | 15 | PASS |
| db block3 numData | 16 | 16 | PASS |
| db block0 data[0] | 0 | 0 | PASS |
| db block0 data[14] | 14 | 14 | PASS |
| db block0 ec[0] | 1000 | 1000 | PASS |
| db block0 ec[17] | 1017 | 1017 | PASS |
| db block3 data[0] | 300 | 300 | PASS |
| db block3 data[15] | 315 | 315 | PASS |
| db block3 len | 34 | 34 | PASS |
| numeric error empty | | | PASS |
| numeric 8675309 | 8675309 | 8675309 | PASS |
| alnum error empty | | | PASS |
| alnum HELLO WORLD | HELLO WORLD | HELLO WORLD | PASS |
| byte error empty | | | PASS |
| byte Hi! | Hi! | Hi! | PASS |
| eci utf8 error empty | | | PASS |
| eci utf8 café | café | café | PASS |
| eci 26 = UTF-8 | UTF-8 | UTF-8 | PASS |
| eci 1 = ISO-8859-1 | ISO-8859-1 | ISO-8859-1 | PASS |
| eci 20 = Shift_JIS | Shift_JIS | Shift_JIS | PASS |
| eci 29 = GB2312 | GB2312 | GB2312 | PASS |
| kanji raises Format error | true | true | PASS |
✓ 17 / 17 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| fixture dimension | 21 | 21 | PASS |
| format ecLevel L(0) | 0 | 0 | PASS |
| format dataMask 0 | 0 | 0 | PASS |
| version 1 | 1 | 1 | PASS |
| codeword count >= 26 | true | true | PASS |
| codeword[0] = 32 | 32 | 32 | PASS |
| codeword[1] = 19 | 19 | 19 | PASS |
| codeword[2] = 15 | 15 | 15 | PASS |
| codeword[3] = 0 | 0 | 0 | PASS |
| codeword[4] = 236 | 236 | 236 | PASS |
| codeword[5] = 17 | 17 | 17 | PASS |
| decode error empty | | | PASS |
| decode text = HI | HI | HI | PASS |
| decode ecLevel L | L | L | PASS |
| decode version 1 | 1 | 1 | PASS |
| decode mask 0 | 0 | 0 | PASS |
| decode with 2 errors -> HI | HI | HI | PASS |
✓ 11 / 11 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| round 2.4 -> 2 | 2 | 2 | PASS |
| round 2.5 -> 3 | 3 | 3 | PASS |
| round 2.6 -> 3 | 3 | 3 | PASS |
| round 13.999 -> 14 | 14 | 14 | PASS |
| round 14.0 -> 14 | 14 | 14 | PASS |
| round -2.5 -> -3 | -3 | -3 | PASS |
| round 0 -> 0 | 0 | 0 | PASS |
| distance (0,0)-(3,4) = 5 | 5 | 5 | PASS |
| distance (1,1)-(4,5) = 5 | 5 | 5 | PASS |
| distance (2,2)-(2,2) = 0 | 0 | 0 | PASS |
| distance (0,0)-(0,7) = 7 | 7 | 7 | PASS |
✓ 8 / 8 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| distance (0,0)-(3,4) = 5 | 5 | 5 | PASS |
| crossProductZ negative | true | true | PASS |
| order[0] bl x | 45 | 45 | PASS |
| order[0] bl y | 129 | 129 | PASS |
| order[1] tl x | 45 | 45 | PASS |
| order[1] tl y | 45 | 45 | PASS |
| order[2] tr x | 129 | 129 | PASS |
| order[2] tr y | 45 | 45 | PASS |
✓ 12 / 12 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| identity (0.5,0.5) x | 0.5 | 0.5 | PASS |
| identity (0.5,0.5) y | 0.5 | 0.5 | PASS |
| identity (0.25,0.75) x | 0.25 | 0.25 | PASS |
| identity (0.25,0.75) y | 0.75 | 0.75 | PASS |
| rect (0,0) x 10 | 10 | 10 | PASS |
| rect (0,0) y 20 | 20 | 20 | PASS |
| rect (1,1) x 30 | 30 | 30 | PASS |
| rect (1,1) y 60 | 60 | 60 | PASS |
| rect centre x 20 | 20 | 20 | PASS |
| rect centre y 40 | 40 | 40 | PASS |
| trapezoid centre x 5 | 5 | 5 | PASS |
| trapezoid centre y 6.25 | 6.25 | 6.25 | PASS |
✓ 3 / 3 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| sampled 3x3 = 101010101 | 101010101 | 101010101 | PASS |
| nudge x=-1 -> 0 | 0 | 0 | PASS |
| nudge x=width -> width-1 | 23 | 23 | PASS |
✓ 15 / 15 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| synthetic image is 116x116 | 116 | 116 | PASS |
| finder TL x = 30 | 30 | 30 | PASS |
| finder TL y = 30 | 30 | 30 | PASS |
| finder TR x = 86 | 86 | 86 | PASS |
| finder TR y = 30 | 30 | 30 | PASS |
| finder BL x = 30 | 30 | 30 | PASS |
| finder BL y = 86 | 86 | 86 | PASS |
| finder TL module size = 4 | 4 | 4 | PASS |
| detect dimension = 21 | 21 | 21 | PASS |
| sampled width = 21 | 21 | 21 | PASS |
| sampled matrix == original HI | true | true | PASS |
| decode error empty | | | PASS |
| decode text = HI | HI | HI | PASS |
| decode version = 1 | 1 | 1 | PASS |
| decode ecLevel = L | L | L | PASS |
✓ 14 / 14 passed
| Test | Expected | Got | Status |
|---|---|---|---|
| v2 synthetic image is 132x132 | 132 | 132 | PASS |
| v2 finder TL = (30,30) | 30,30 | 30,30 | PASS |
| v2 finder TR = (102,30) | 102,30 | 102,30 | PASS |
| v2 finder BL = (30,102) | 30,102 | 30,102 | PASS |
| v2 detect dimension = 25 | 25 | 25 | PASS |
| v2 alignment point present | true | true | PASS |
| v2 alignment x = 90 | 90 | 90 | PASS |
| v2 alignment y = 90 | 90 | 90 | PASS |
| v2 sampled width = 25 | 25 | 25 | PASS |
| v2 sampled matrix == original | true | true | PASS |
| v2 decode error empty | | | PASS |
| v2 decode text = HELLO WORLD | HELLO WORLD | HELLO WORLD | PASS |
| v2 decode version = 2 | 2 | 2 | PASS |
| v2 decode ecLevel = M | M | M | PASS |
Generated by qr_tester.lc · engine 9.6.11 · Linux