MCPcopy
hub / github.com/op/go-logging / TestStructFuncFormat

Function TestStructFuncFormat

format_test.go:59–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57}
58
59func TestStructFuncFormat(t *testing.T) {
60 backend := InitForTesting(DEBUG)
61 SetFormatter(MustStringFormatter("%{longfunc}"))
62
63 var x structFunc
64 line := x.Log(backend)
65 if "structFunc.Log" != line {
66 t.Errorf("Unexpected format: %s", line)
67 }
68}
69
70func TestVarFuncFormat(t *testing.T) {
71 backend := InitForTesting(DEBUG)

Callers

nothing calls this directly

Calls 5

LogMethod · 0.95
InitForTestingFunction · 0.85
SetFormatterFunction · 0.85
MustStringFormatterFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected