Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMinMax (0.28 sec)

  1. src/slices/sort_test.go

    		t.Errorf("Stable wasn't stable on %d ints", n)
    	}
    }
    
    type S struct {
    	a int
    	b string
    }
    
    func cmpS(s1, s2 S) int {
    	return cmp.Compare(s1.a, s2.a)
    }
    
    func TestMinMax(t *testing.T) {
    	intCmp := func(a, b int) int { return a - b }
    
    	tests := []struct {
    		data    []int
    		wantMin int
    		wantMax int
    	}{
    		{[]int{7}, 7, 7},
    		{[]int{1, 2}, 1, 2},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 19:20:55 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top