Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestSwitch (0.28 sec)

  1. src/cmd/compile/internal/test/testdata/ctl_test.go

    	return ret
    }
    
    func testFallthrough(t *testing.T) {
    	for i := 0; i < 6; i++ {
    		if got := fallthrough_ssa(i); got != i {
    			t.Errorf("fallthrough_ssa(i) = %d, wanted %d", got, i)
    		}
    	}
    }
    
    func testSwitch(t *testing.T) {
    	for i := 0; i < 6; i++ {
    		if got := switch_ssa(i); got != i {
    			t.Errorf("switch_ssa(i) = %d, wanted %d", got, i)
    		}
    	}
    }
    
    type junk struct {
    	step int
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. src/net/internal/socktest/main_test.go

    var sw socktest.Switch
    
    func TestMain(m *testing.M) {
    	installTestHooks()
    
    	st := m.Run()
    
    	for s := range sw.Sockets() {
    		closeFunc(s)
    	}
    	uninstallTestHooks()
    	os.Exit(st)
    }
    
    func TestSwitch(t *testing.T) {
    	const N = 10
    	var wg sync.WaitGroup
    	wg.Add(N)
    	for i := 0; i < N; i++ {
    		go func() {
    			defer wg.Done()
    			for _, family := range []int{syscall.AF_INET, syscall.AF_INET6} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 18:36:30 UTC 2023
    - 1.1K bytes
    - Viewed (0)
Back to top