MCPcopy Create free account
hub / github.com/0xAX/go-algorithms / TestSort

Function TestSort

sorting/sort_test.go:26–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24}
25
26func TestSort(t *testing.T) {
27 for _, tt := range funcs {
28 t.Run(tt.name, func(t *testing.T) {
29 arr := utils.RandArray(10)
30
31 tt.f(arr)
32
33 if !sort.IntsAreSorted(arr) {
34 t.Errorf("%v is not sorted", arr)
35 }
36 })
37 }
38}
39
40func BenchmarkSort(b *testing.B) {
41 for _, tt := range funcs {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected