示例#1
0
func (self *runner) ensureStoryCanBegin() {
	if self.awaitingNewStory {
		self.awaitingNewStory = false
	} else {
		panic(fmt.Sprintf("%s (See %s)", ExtraGoTest, gotest.FormatExternalFileAndLine()))
	}
}
示例#2
0
func NewSkippedAction(action func()) *Action {
	self := &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.action = action
	return self
}