Merge pull request #34 from bertabus/bertabus-patch-1

fixed 'B' encoding for codabar
This commit is contained in:
Florian 2018-02-03 09:01:48 +01:00 committed by GitHub
commit 5a7395f627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -25,10 +25,10 @@ var encodingTable = map[rune][]bool{
':': []bool{true, true, false, true, false, true, true, false, true, true}, ':': []bool{true, true, false, true, false, true, true, false, true, true},
'/': []bool{true, true, false, true, true, false, true, false, true, true}, '/': []bool{true, true, false, true, true, false, true, false, true, true},
'.': []bool{true, true, false, true, true, false, true, true, false, true}, '.': []bool{true, true, false, true, true, false, true, true, false, true},
'+': []bool{true, false, true, true, false, false, true, true, false, false, true, true}, '+': []bool{true, false, true, true, false, true, true, false, true, true},
'A': []bool{true, false, true, true, false, false, true, false, false, true}, 'A': []bool{true, false, true, true, false, false, true, false, false, true},
'B': []bool{true, false, true, false, false, true, false, false, true, true}, 'B': []bool{true, false, false, true, false, false, true, false, true, true},
'C': []bool{true, false, false, true, false, false, true, false, true, true}, 'C': []bool{true, false, true, false, false, true, false, false, true, true},
'D': []bool{true, false, true, false, false, true, true, false, false, true}, 'D': []bool{true, false, true, false, false, true, true, false, false, true},
} }

View File

@ -28,5 +28,5 @@ func Test_Encode(t *testing.T) {
} }
} }
testEncode("A40156B", "10110010010101101001010101001101010110010110101001010010101101010010011") testEncode("A40156B", "10110010010101101001010101001101010110010110101001010010101101001001011")
} }