Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestNoRaceMapRangeRange (0.44 sec)

  1. src/runtime/race/testdata/map_test.go

    	<-ch
    }
    
    func TestRaceMapRange2(t *testing.T) {
    	m := make(map[int]int)
    	ch := make(chan bool, 1)
    	go func() {
    		for range m {
    		}
    		ch <- true
    	}()
    	m[1] = 1
    	<-ch
    }
    
    func TestNoRaceMapRangeRange(t *testing.T) {
    	m := make(map[int]int)
    	// now the map is not empty and range triggers an event
    	// should work without this (as in other tests)
    	// so it is suspicious if this test passes and others don't
    	m[0] = 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 03 22:09:38 UTC 2017
    - 5.1K bytes
    - Viewed (0)
Back to top