Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestNonDeterministicComparison (0.34 sec)

  1. src/sort/sort_test.go

    }
    func (t *nonDeterministicTestingData) Swap(i, j int) {
    	if i < 0 || j < 0 || i >= t.Len() || j >= t.Len() {
    		panic("nondeterministic comparison out of bounds")
    	}
    }
    
    func TestNonDeterministicComparison(t *testing.T) {
    	// Ensure that sort.Sort does not panic when Less returns inconsistent results.
    	// See https://golang.org/issue/14377.
    	defer func() {
    		if r := recover(); r != nil {
    			t.Error(r)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:41:04 UTC 2024
    - 16.9K bytes
    - Viewed (0)
Back to top