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

Function testHighLevelEncodeString

aztec/highlevel_test.go:24–32  ·  view source on GitHub ↗
(t *testing.T, s, expectedBits string)

Source from the content-addressed store, hash-verified

22}
23
24func testHighLevelEncodeString(t *testing.T, s, expectedBits string) {
25 bits := highlevelEncode([]byte(s))
26 result := bitStr(bits)
27 expectedBits = strings.Replace(expectedBits, " ", "", -1)
28
29 if result != expectedBits {
30 t.Errorf("invalid result for highlevelEncode(%q). Got:\n%s", s, result)
31 }
32}
33func testHighLevelEncodeStringCnt(t *testing.T, s string, expectedBitCnt int) {
34 bits := highlevelEncode([]byte(s))
35

Callers 2

Test_HighLevelEncodeFunction · 0.85

Calls 2

bitStrFunction · 0.85
highlevelEncodeFunction · 0.70

Tested by

no test coverage detected