compiler/ssa: test debug check verbose

This commit is contained in:
visualfc
2025-02-05 10:07:55 +08:00
parent e23d18dab8
commit 8e8b97f623

View File

@@ -17,7 +17,10 @@
package ssa_test package ssa_test
import ( import (
"flag"
"go/types" "go/types"
"io"
"log"
"testing" "testing"
"github.com/goplus/llgo/compiler/cl/cltest" "github.com/goplus/llgo/compiler/cl/cltest"
@@ -25,8 +28,13 @@ import (
"github.com/goplus/llgo/compiler/ssa/ssatest" "github.com/goplus/llgo/compiler/ssa/ssatest"
) )
func init() { func TestMain(m *testing.M) {
flag.Parse()
ssa.SetDebug(ssa.DbgFlagAll) ssa.SetDebug(ssa.DbgFlagAll)
if !testing.Verbose() {
log.SetOutput(io.Discard)
}
m.Run()
} }
func TestFromTestlibgo(t *testing.T) { func TestFromTestlibgo(t *testing.T) {