Exemplo n.º 1
0
func (self *runnerStruct) Run(t *testing.T, runFunction func(t btesting.T)) {
	for _, testing := range self.testings {
		runFunction(testing)
		if testing.Failed() {
			t.Error(testing.FailedMessage())
			return
		}
	}
}
Exemplo n.º 2
0
func (self *runnerStruct) BRun(t *testing.B, runFunction func(t btesting.T, n int, b *testing.B)) {
	var adjustedN = t.N / len(self.testings)
	for _, testing := range self.testings {
		runFunction(testing, adjustedN, t)
		if testing.Failed() {
			t.Error(testing.FailedMessage())
			return
		}
	}
}