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

Function TestMin

math/min/min_test.go:41–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestMin(t *testing.T) {
42 for _, test := range getTestCases() {
43 t.Run(test.name, func(t *testing.T) {
44 actualMin := Int(test.numbers...)
45 if actualMin != test.min {
46 t.Errorf("Wrong result! Expected:%v, returned:%v ", test.min, actualMin)
47 }
48 })
49 }
50}
51
52func BenchmarkTestMinInt(b *testing.B) {
53 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 2

getTestCasesFunction · 0.85
IntFunction · 0.70

Tested by

no test coverage detected