/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tools/gotest2junit/pkg/api/test_case.go
30 строк
731 B
Clayton Coleman
Switch origin to use gotest2junit
03 июл 2018, 01:04
Не верифицирован
03 июл 2018, 01:04
5bd42aa
Код
Авторство
О чём код?
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, } }