Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestManualTicker (0.15 sec)

  1. src/time/tick_test.go

    		} else {
    			noTick()
    		}
    		if pending, want := tim.Reset(Hour), isTicker; pending != want {
    			t.Errorf("tim.Stop() = %v, want %v", pending, want)
    		}
    		noTick()
    	}
    }
    
    func TestManualTicker(t *testing.T) {
    	// Code should not do this, but some old code dating to Go 1.9 does.
    	// Make sure this doesn't crash.
    	// See go.dev/issue/21874.
    	c := make(chan Time)
    	tick := &Ticker{C: c}
    	tick.Stop()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:10:37 UTC 2024
    - 14.7K bytes
    - Viewed (0)
Back to top