MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / getTestGraphsForNegativeTests

Function getTestGraphsForNegativeTests

graph/coloring/graph_test.go:131–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129}
130
131func getTestGraphsForNegativeTests() (list []*testGraph) {
132 list = getTestGraphs()
133 list[0].VertexColors = nil
134 list[1].VertexColors = map[int]coloring.Color{}
135 for v := range list[2].VertexColors {
136 in := len(list[2].VertexColors) - v - 1
137 list[2].VertexColors[v] = list[2].VertexColors[in]
138 }
139 for v := range list[3].VertexColors {
140 list[3].VertexColors[v] = 1
141 }
142 return list[:4]
143}
144
145func TestGraphValidateColorsOfVertex_Negative(t *testing.T) {
146 for i, tt := range getTestGraphsForNegativeTests() {

Calls 1

getTestGraphsFunction · 0.85

Tested by

no test coverage detected