github.com/zaquestion/lab@v0.25.1/main_test.go (about) 1 package main 2 3 // This file is mandatory as otherwise the lab.test binary is not generated correctly. 4 import ( 5 "flag" 6 "math/rand" 7 "strconv" 8 "testing" 9 "time" 10 ) 11 12 // Test started when the test binary is started. Only calls main. 13 func TestLab(t *testing.T) { 14 rand.Seed(time.Now().UnixNano()) 15 flag.Set("test.coverprofile", "../coverage-"+strconv.Itoa(int(rand.Uint64()))+".out") 16 main() 17 }