https://github.com/icio/go-test-count-debug
https://github.com/icio/go-test-count-debug
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/icio/go-test-count-debug
- Owner: icio
- Created: 2019-02-14T11:40:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-14T11:43:09.000Z (over 7 years ago)
- Last Synced: 2025-01-28T00:43:16.775Z (over 1 year ago)
- Language: Go
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
$ cat count_test.go
package test
import (
"fmt"
"os"
"testing"
)
func init() {
fmt.Println("init")
}
func TestExample(t *testing.T) {
fmt.Println("TestExample run")
}
func TestMain(m *testing.M) {
fmt.Println("MainTest in")
exit := m.Run()
fmt.Println("MainTest out")
os.Exit(exit)
}
$ go test -count 2 -v .
init
MainTest in
=== RUN TestExample
TestExample run
--- PASS: TestExample (0.00s)
=== RUN TestExample
TestExample run
--- PASS: TestExample (0.00s)
PASS
MainTest out
ok github.com/icio/go-test-count-debug 0.001s