Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSort (0.08 sec)

  1. src/cmp/cmp_test.go

    		case uintptr:
    			c = cmp.Compare(test.x.(uintptr), test.y.(uintptr))
    		}
    		if c != test.compare {
    			t.Errorf("Compare(%v, %v) == %d, want %d", test.x, test.y, c, test.compare)
    		}
    	}
    }
    
    func TestSort(t *testing.T) {
    	// Test that our comparison function is consistent with
    	// sort.Float64s.
    	input := []float64{1.0, 0.0, negzero, math.Inf(1), math.Inf(-1), math.NaN()}
    	sort.Float64s(input)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 23:39:07 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top