MCPcopy
hub / github.com/AlexxIT/go2rtc / TestFormatAlphaNum

Function TestFormatAlphaNum

pkg/hap/setup/setup_test.go:12–18  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestFormatAlphaNum(t *testing.T) {
13 value := int64(999)
14 n := 5
15 s1 := strings.ToUpper(fmt.Sprintf("%0"+strconv.Itoa(n)+"s", strconv.FormatInt(value, 36)))
16 s2 := FormatInt36(value, n)
17 require.Equal(t, s1, s2)
18}

Callers

nothing calls this directly

Calls 2

FormatInt36Function · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected