Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TestSwitch (0.08 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)
  3. src/cmd/cover/testdata/test.go

    var some_name int
    
    const anything = 1e9 // Just some unlikely value that means "we got here, don't care how often"
    
    func testAll() {
    	testSimple()
    	testBlockRun()
    	testIf()
    	testFor()
    	testRange()
    	testSwitch()
    	testTypeSwitch()
    	testSelect1()
    	testSelect2()
    	testPanic()
    	testEmptySwitches()
    	testFunctionLiteral()
    	testGoto()
    }
    
    // The indexes of the counters in testPanic are known to main.go
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 4.9K bytes
    - Viewed (0)
Back to top