Ejemplo n.º 1
0
func (self *runner) link(action *action) string {
	_, _, parentAction := gotest.ResolveExternalCaller()
	childAction := action.name
	self.linkTo(topLevel, parentAction)
	self.linkTo(parentAction, childAction)
	return parentAction
}
Ejemplo n.º 2
0
func NewScopeReport(title string) *ScopeReport {
	file, line, _ := gotest.ResolveExternalCaller()
	self := new(ScopeReport)
	self.Title = title
	self.File = file
	self.Line = line
	return self
}
Ejemplo n.º 3
0
func NewScopeReport(title, name string) *ScopeReport {
	file, line, _ := gotest.ResolveExternalCaller()
	self := new(ScopeReport)
	self.Title = title
	self.ID = fmt.Sprintf("%s|%s", title, name)
	self.File = file
	self.Line = line
	return self
}
Ejemplo n.º 4
0
func newRegistration(situation string, action *action, test t) *registration {
	file, line, _ := gotest.ResolveExternalCaller()
	self := new(registration)
	self.Situation = situation
	self.action = action
	self.Test = test
	self.File = file
	self.Line = line
	return self
}
Ejemplo n.º 5
0
func NewStoryReport(test T) *StoryReport {
	file, line, name := gotest.ResolveExternalCaller()
	name = removePackagePath(name)
	self := new(StoryReport)
	self.Test = test
	self.Name = name
	self.File = file
	self.Line = line
	return self
}
Ejemplo n.º 6
0
func newRegistration(situation string, action *action, test t) *registration {
	file, line, _ := gotest.ResolveExternalCaller()

	return &registration{
		Situation: situation,
		action:    action,
		Test:      test,
		File:      file,
		Line:      line,
	}
}
Ejemplo n.º 7
0
func caller() (file string, line int) {
	file, line, _ = gotest.ResolveExternalCaller()
	return
}