1
0
mirror of https://github.com/mgechev/revive.git synced 2025-05-13 21:46:43 +02:00
revive/testdata/redundant_test_main_exit_test.go
2025-01-29 14:36:00 +01:00

28 lines
349 B
Go

package fixtures
import (
"fmt"
"os"
"testing"
)
func TestMain(m *testing.M) {
setup()
i := m.Run()
teardown()
// must not match because the go version of this module is less than 1.15
os.Exit(i)
}
func setup() {
fmt.Println("Setup")
}
func teardown() {
fmt.Println("Teardown")
}
func Test_function(t *testing.T) {
t.Error("Fail")
}