go-test-color/example/example_test.go

36 lines
478 B
Go
Raw Normal View History

2022-08-13 10:06:54 +00:00
package example
import (
"testing"
"time"
)
const longTime = time.Second * 2
func TestPassShortTime(t *testing.T) {
}
func TestPassLongTime(t *testing.T) {
time.Sleep(longTime)
}
func TestFailShorTime(t *testing.T) {
t.Fail()
}
func TestFailLongTime(t *testing.T) {
time.Sleep(longTime)
t.Fail()
}
func TestFailShorTimeParallel(t *testing.T) {
t.Parallel()
t.Fail()
}
func TestFailLongTimeParallel(t *testing.T) {
t.Parallel()
time.Sleep(longTime)
t.Fail()
}