Skip to content

Commit 92a47cc

Browse files
committed
testing
1 parent 0f1d8d9 commit 92a47cc

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/01-testmain/main_test.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package main
2+
3+
import (
4+
"flag"
5+
"fmt"
6+
"os"
7+
"testing"
8+
)
9+
10+
func TestMain(m *testing.M) {
11+
fmt.Printf("TestMain: Start\n")
12+
13+
flag.Parse()
14+
exitCode := m.Run()
15+
16+
fmt.Printf("TestMain: End\n")
17+
os.Exit(exitCode)
18+
}
19+
20+
func TestOne(t *testing.T) {
21+
fmt.Printf("TestOne\n")
22+
}
23+
24+
func TestTwo(t *testing.T) {
25+
fmt.Printf("TestTwo\n")
26+
}

0 commit comments

Comments
 (0)