Ejemplo n.º 1
0
func parseAction(items []interface{}, test t) *execution.Action {
	var index = 1
	if test != nil {
		index = 2
	}

	if action, parsed := items[index].(func()); parsed {
		return execution.NewAction(action)
	}
	if items[index] == nil {
		return execution.NewSkippedAction(skipReport)
	}
	panic(parseError)
}
Ejemplo n.º 2
0
// Reset registers a cleanup function to be run after each Convey()
// in the same scope. See the examples package for a simple use case.
func Reset(action func()) {
	suites.CurrentRunner().RegisterReset(execution.NewAction(action))
}
Ejemplo n.º 3
0
func newFakeRunner() *fakeRunner {
	f := fakeRunner{}
	f.action = execution.NewAction(func() {})
	return &f
}
Ejemplo n.º 4
0
// Reset registers a cleanup function to be run after each Convey()
// in the same scope. See the examples package for a simple use case.
func Reset(action func()) {
	runner.RegisterReset(execution.NewAction(action))
}