Сравнить коммиты

..

5 коммитов
main ... v1.3.2

2 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -44,6 +44,9 @@ func getTestAssertPlace() string {
}
func getTestAssertFullPathPlace() string {
_, file, line, _ := runtime.Caller(CALL_STACK_DEPTH_TO_TEST_FILE)
if strings.HasSuffix(file, "/godog_and_gomega_helpers.go") {
_, file, line, _ = runtime.Caller(CALL_STACK_DEPTH_TO_TEST_FILE + 1)
}
return fmt.Sprintf("%v:%v", file, line)
}
func getProjectRootRelativeTestAssertPlace(place string) string {

Просмотреть файл

@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"strconv"
"time"
. "github.com/onsi/gomega"
)
@ -43,3 +44,19 @@ func Atof(in string) float64 {
Ok(err)
return res
}
func Истина(in string) bool {
switch in {
case "+", "да", "Да", "ДА", "t", "true", "True", "TRUE":
return true
}
return false
}
func SetTestDeadlockProtection(seconds int) {
go checkTestTimeout(time.Duration(seconds) * time.Second)
}
func checkTestTimeout(t time.Duration) {
<-time.After(t)
panic("Test Suite Timeout")
}