Search Options

Results per page
Sort
Preferred Languages
Advance

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

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

    	// so it is suspicious if this test passes and others don't
    	m[0] = 0
    	ch := make(chan bool, 1)
    	go func() {
    		for range m {
    		}
    		ch <- true
    	}()
    	for range m {
    	}
    	<-ch
    }
    
    func TestRaceMapLen(t *testing.T) {
    	m := make(map[string]bool)
    	ch := make(chan bool, 1)
    	go func() {
    		_ = len(m)
    		ch <- true
    	}()
    	m[""] = true
    	<-ch
    }
    
    func TestRaceMapDelete(t *testing.T) {
    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