Example #1
0
func (self *runner) ensureStoryCanBegin() {
	if self.awaitingNewStory {
		self.awaitingNewStory = false
	} else {
		panic(fmt.Sprintf("%s (See %s)", extraGoTest, gotest.FormatExternalFileAndLine()))
	}
}
Example #2
0
func newSkippedAction(wrapped func()) *action {
	self := new(action)

	// The choice to use the filename and line number as the action name
	// reflects the need for something unique but also that corresponds
	// in a determinist way to the action itself.
	self.name = gotest.FormatExternalFileAndLine()
	self.wrapped = wrapped
	return self
}
Example #3
0
func newSkippedAction(wrapped func(), mode FailureMode) *action {
	// The choice to use the filename and line number as the action name
	// reflects the need for something unique but also that corresponds
	// in a determinist way to the action itself.
	return &action{
		name:        gotest.FormatExternalFileAndLine(),
		wrapped:     wrapped,
		failureMode: mode,
	}
}