MCPcopy Index your code
hub / github.com/adam-hanna/arrayOperations / TestMap

Function TestMap

arrayOperations_unit_test.go:135–143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

133}
134
135func TestMap(t *testing.T) {
136 arr := []int{1, 2, 3}
137 newArr := Map(arr, addTen)
138 expected := []int{11, 12, 13}
139
140 if !reflect.DeepEqual(newArr, expected) {
141 t.Errorf("expected %v, received %v", expected, newArr)
142 }
143}
144
145type testDistinctInput[T comparable] [][]T
146type testDistinctOutput[T comparable] []T

Callers

nothing calls this directly

Calls 1

MapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…