Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMinMaxStringTies (0.26 sec)

  1. src/runtime/minmax_test.go

    func TestMinMaxUint8(t *testing.T)  { testMinMax[uint8](t, 0, 1, 2, 4, 7) }
    func TestMinMaxString(t *testing.T) { testMinMax[string](t, "a", "b", "c") }
    
    // TestMinMaxStringTies ensures that min(a, b) returns a when a == b.
    func TestMinMaxStringTies(t *testing.T) {
    	s := "xxx"
    	x := strings.Split(s, "")
    
    	test := func(i, j, k int) {
    		if z := min(x[i], x[j], x[k]); unsafe.StringData(z) != unsafe.StringData(x[i]) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 26 01:41:50 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top