package main import ( "testing" "time" ) func TestTimeAdd(t *testing.T) { finishpoint := time.Now() time.Sleep(time.Second * 2) t.Error(time.Now().Sub(finishpoint) > time.Second*1) } func TestMain(t *testing.T) { main() }