/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tools/junitreport/pkg/api/test_case.go
30 строк
731 B
Steve Kuznetsov
added junitreport tool
07 янв 2016, 21:12
07 янв 2016, 21:12
3da7c1a
Код
Авторство
О чём код?
package api import "time" // SetDuration sets the runtime duration of the test case func (t *TestCase) SetDuration(duration string) error { parsedDuration, err := time.ParseDuration(duration) if err != nil { return err } // we round to the millisecond on duration t.Duration = float64(int(parsedDuration.Seconds()*1000)) / 1000 return nil } // MarkSkipped marks the test as skipped with the given message func (t *TestCase) MarkSkipped(message string) { t.SkipMessage = &SkipMessage{ Message: message, } } // MarkFailed marks the test as failed with the given message and output func (t *TestCase) MarkFailed(message, output string) { t.FailureOutput = &FailureOutput{ Message: message, Output: output, } }