From 8e8b97f623714e6cec7d5d04e2f6092f516ea8a6 Mon Sep 17 00:00:00 2001 From: visualfc Date: Wed, 5 Feb 2025 10:07:55 +0800 Subject: [PATCH] compiler/ssa: test debug check verbose --- compiler/ssa/cl_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/compiler/ssa/cl_test.go b/compiler/ssa/cl_test.go index 91d229f6..6aee3271 100644 --- a/compiler/ssa/cl_test.go +++ b/compiler/ssa/cl_test.go @@ -17,7 +17,10 @@ package ssa_test import ( + "flag" "go/types" + "io" + "log" "testing" "github.com/goplus/llgo/compiler/cl/cltest" @@ -25,8 +28,13 @@ import ( "github.com/goplus/llgo/compiler/ssa/ssatest" ) -func init() { +func TestMain(m *testing.M) { + flag.Parse() ssa.SetDebug(ssa.DbgFlagAll) + if !testing.Verbose() { + log.SetOutput(io.Discard) + } + m.Run() } func TestFromTestlibgo(t *testing.T) {