Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestDenomRace (0.17 sec)

  1. src/math/big/rat_test.go

    		r := &Rat{Int{abs: nat{991}}, Int{abs: make(nat, 0, 1)}}
    		acc.f(r)
    		if d := r.b.abs[:1][0]; d != 0 {
    			t.Errorf("%s modified denominator: got %d, want 0", acc.name, d)
    		}
    	}
    }
    
    func TestDenomRace(t *testing.T) {
    	x := NewRat(1, 2)
    	const N = 3
    	c := make(chan bool, N)
    	for i := 0; i < N; i++ {
    		go func() {
    			// Denom (also used by Float.SetRat) used to mutate x unnecessarily,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 07 00:15:59 UTC 2022
    - 18.9K bytes
    - Viewed (0)
Back to top