engine: test: Pass in the go test verbose flag

This hooks up our debug variable to the go test verbose flag.
This commit is contained in:
James Shubin
2018-05-09 12:11:35 -04:00
parent 299080f590
commit 3ced981d28
3 changed files with 3 additions and 3 deletions

View File

@@ -222,7 +222,7 @@ func (obj *testGrouper) EdgeMerge(e1, e2 pgraph.Edge) pgraph.Edge {
// helper function // helper function
func runGraphCmp(t *testing.T, g1, g2 *pgraph.Graph) { func runGraphCmp(t *testing.T, g1, g2 *pgraph.Graph) {
debug := true debug := testing.Verbose() // set via the -test.v flag to `go test`
logf := func(format string, v ...interface{}) { logf := func(format string, v ...interface{}) {
t.Logf("test: "+format, v...) t.Logf("test: "+format, v...)
} }

View File

@@ -24,7 +24,7 @@ import (
) )
func fakeInit(t *testing.T) *engine.Init { func fakeInit(t *testing.T) *engine.Init {
debug := true debug := testing.Verbose() // set via the -test.v flag to `go test`
logf := func(format string, v ...interface{}) { logf := func(format string, v ...interface{}) {
t.Logf("test: "+format, v...) t.Logf("test: "+format, v...)
} }

View File

@@ -52,7 +52,7 @@ func TestFileAutoEdge1(t *testing.T) {
t.Errorf("should have 0 edges instead of: %d", i) t.Errorf("should have 0 edges instead of: %d", i)
} }
debug := true debug := testing.Verbose() // set via the -test.v flag to `go test`
logf := func(format string, v ...interface{}) { logf := func(format string, v ...interface{}) {
t.Logf("test: "+format, v...) t.Logf("test: "+format, v...)
} }