fuzzyworld

template / ci-testing / files / main_test.go

Branch ci-testing · default branch · all branches

main_test.go

Blame: the commit that last changed each line · file · history

c3fc7a22 2022-10-30 Pavel Safronov1package main
2
3import (
4 "os"
5 "testing"
6)
7
8func TestMain(m *testing.M) {
9 setup()
10 code := m.Run()
11 shutdown()
12 os.Exit(code)
13}
14
15func setup() {
16 // setup code
17}
18func shutdown() {
19 // shutdown code
20
21 // not really necessary, but why not?
22 undoMonkeyPatch()
23}