github.com/keysonzzz/kmg@v0.0.0-20151121023212-05317bfd7d39/kmgSort/IntLessCallbackSort_test.go (about) 1 package kmgSort 2 import ( 3 "testing" 4 "github.com/bronze1man/kmg/kmgTest" 5 ) 6 7 func TestIntLessCallbackSort(t *testing.T) { 8 a := []int{2, 1, 3, 0} 9 IntLessCallbackSort(a, func(i int, j int) bool { 10 return a[i] < a[j] 11 }) 12 kmgTest.Equal(a, []int{0, 1, 2, 3}) 13 }