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

Function Test_shouldUseCTable

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

Source from the content-addressed store, hash-verified

72}
73
74func Test_shouldUseCTable(t *testing.T) {
75 if !shouldUseCTable([]rune{FNC1, '1', '2'}, startCSymbol) {
76 t.Error("[FNC1]12 failed")
77 }
78 if shouldUseCTable([]rune{FNC1, '1'}, startCSymbol) {
79 t.Error("[FNC1]1 failed")
80 }
81 if shouldUseCTable([]rune{'0', FNC1, '1'}, startCSymbol) {
82 t.Error("0[FNC1]1 failed")
83 }
84 if !shouldUseCTable([]rune{'0', '1', FNC1, '2', '3'}, startBSymbol) {
85 t.Error("01[FNC1]23 failed")
86 }
87 if shouldUseCTable([]rune{'0', '1', FNC1}, startBSymbol) {
88 t.Error("01[FNC1] failed")
89 }
90}
91
92func Test_Issue16(t *testing.T) {
93 if !shouldUseATable([]rune{'\r', 'A'}, 0) {

Callers

nothing calls this directly

Calls 1

shouldUseCTableFunction · 0.85

Tested by

no test coverage detected