MCPcopy Create free account
hub / github.com/boombuler/barcode / Test_EncodeCTable

Function Test_EncodeCTable

code128/encode_test.go:61–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func Test_EncodeCTable(t *testing.T) {
62 testEncode(t, "HI345678H", "110100100001100010100011000100010101110111101000101100011100010110110000101001011110111011000101000111011000101100011101011")
63 testEncode(t, "334455", "11010011100101000110001000110111011101000110100100111101100011101011")
64
65 testEncode(t, string(FNC1)+"1234",
66 "11010011100"+ // Start C
67 "11110101110"+ // FNC1
68 "10110011100"+ // 12
69 "10001011000"+ // 34
70 "11101001100"+ // CheckSum == 24
71 "1100011101011") // Stop
72}
73
74func Test_shouldUseCTable(t *testing.T) {
75 if !shouldUseCTable([]rune{FNC1, '1', '2'}, startCSymbol) {

Callers

nothing calls this directly

Calls 1

testEncodeFunction · 0.85

Tested by

no test coverage detected