MCPcopy Create free account
hub / github.com/github/gh-aw / TestSpec_PublicAPI_String

Function TestSpec_PublicAPI_String

pkg/github/spec_test.go:240–250  ·  view source on GitHub ↗

TestSpec_PublicAPI_String validates the documented String() format: "ObjectiveMapping{labels: N, logic: X, priorities: M}".

(t *testing.T)

Source from the content-addressed store, hash-verified

238// TestSpec_PublicAPI_String validates the documented String() format:
239// "ObjectiveMapping{labels: N, logic: X, priorities: M}".
240func TestSpec_PublicAPI_String(t *testing.T) {
241 om := &github.ObjectiveMapping{
242 LabelToValue: map[string]int{"bug": 60, "documentation": 5},
243 MultiLabelLogic: github.MultiLabelLogicSum,
244 PriorityLabels: []string{"bug"},
245 }
246
247 got := om.String()
248 assert.Equal(t, "ObjectiveMapping{labels: 2, logic: sum, priorities: 1}", got,
249 "String() should follow the documented format")
250}
251
252// TestSpec_Functions_DefaultObjectiveMapping validates that
253// DefaultObjectiveMapping returns the built-in default mapping. The README

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected