MCPcopy
hub / github.com/prometheus/client_golang / TestNewDescWithNilLabelValues_String

Function TestNewDescWithNilLabelValues_String

prometheus/desc_test.go:44–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

42}
43
44func TestNewDescWithNilLabelValues_String(t *testing.T) {
45 desc := NewDesc(
46 "sample_label",
47 "sample label",
48 nil,
49 nil,
50 )
51 if desc.String() != `Desc{fqName: "sample_label", help: "sample label", constLabels: {}, variableLabels: {}}` {
52 t.Errorf("String: unexpected output: %s", desc.String())
53 }
54}
55
56func TestNewInvalidDesc_String(t *testing.T) {
57 desc := NewInvalidDesc(

Callers

nothing calls this directly

Calls 2

StringMethod · 0.95
NewDescFunction · 0.85

Tested by

no test coverage detected