AddRun creates a new *TestRun with the given name, ID and Runnable, adds it to the harness and returns it. Panics if the harness has been started, or a test with the given run.FullID() is already registered. This is a convenience method that calls NewTestRun() and h.RegisterRun().
(testName string, id string, runner Runnable)
| 44 | // |
| 45 | // This is a convenience method that calls NewTestRun() and h.RegisterRun(). |
| 46 | func (h *TestHarness) AddRun(testName string, id string, runner Runnable) *TestRun { |
| 47 | run := NewTestRun(testName, id, runner) |
| 48 | h.RegisterRun(run) |
| 49 | |
| 50 | return run |
| 51 | } |
| 52 | |
| 53 | // RegisterRun registers the given *TestRun with the harness. Panics if the |
| 54 | // harness has been started, or a test with the given run.FullID() is already |