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

Function TestSpec_Functions_DefaultObjectiveMapping

pkg/github/spec_test.go:256–264  ·  view source on GitHub ↗

TestSpec_Functions_DefaultObjectiveMapping validates that DefaultObjectiveMapping returns the built-in default mapping. The README documents its String() representation as "ObjectiveMapping{labels: 12, logic: max, priorities: 7}".

(t *testing.T)

Source from the content-addressed store, hash-verified

254// documents its String() representation as
255// "ObjectiveMapping{labels: 12, logic: max, priorities: 7}".
256func TestSpec_Functions_DefaultObjectiveMapping(t *testing.T) {
257 om := github.DefaultObjectiveMapping()
258 require.NotNil(t, om, "DefaultObjectiveMapping should return a non-nil mapping")
259
260 assert.Equal(t, github.MultiLabelLogicMax, om.MultiLabelLogic,
261 "the default mapping uses \"max\" logic per the README")
262 assert.Equal(t, "ObjectiveMapping{labels: 12, logic: max, priorities: 7}", om.String(),
263 "the documented default mapping summary should match")
264}
265
266// TestSpec_Functions_LoadObjectiveMappingFromConfig validates that, absent any
267// environment or config-file override, LoadObjectiveMappingFromConfig falls

Callers

nothing calls this directly

Calls 2

DefaultObjectiveMappingFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected