Browse Source

codec: test: stop using testVerbose

Ugorji Nwoke 8 years ago
parent
commit
46e03b0162
2 changed files with 3 additions and 3 deletions
  1. 2 2
      codec/shared_test.go
  2. 1 1
      codec/z_all_test.go

+ 2 - 2
codec/shared_test.go

@@ -148,7 +148,7 @@ func init() {
 func testInitFlags() {
 func testInitFlags() {
 	// delete(testDecOpts.ExtFuncs, timeTyp)
 	// delete(testDecOpts.ExtFuncs, timeTyp)
 	flag.IntVar(&testDepth, "tsd", 0, "Test Struc Depth")
 	flag.IntVar(&testDepth, "tsd", 0, "Test Struc Depth")
-	flag.BoolVar(&testVerbose, "tv", false, "Test Verbose")
+	flag.BoolVar(&testVerbose, "tv", false, "Test Verbose (no longer used - here for compatibility)")
 	flag.BoolVar(&testInitDebug, "tg", false, "Test Init Debug")
 	flag.BoolVar(&testInitDebug, "tg", false, "Test Init Debug")
 	flag.IntVar(&testUseIoEncDec, "ti", -1, "Use IO Reader/Writer for Marshal/Unmarshal ie >= 0")
 	flag.IntVar(&testUseIoEncDec, "ti", -1, "Use IO Reader/Writer for Marshal/Unmarshal ie >= 0")
 	flag.BoolVar(&testUseIoWrapper, "tiw", false, "Wrap the IO Reader/Writer with a base pass-through reader/writer")
 	flag.BoolVar(&testUseIoWrapper, "tiw", false, "Wrap the IO Reader/Writer with a base pass-through reader/writer")
@@ -277,7 +277,7 @@ func logT(x interface{}, format string, args ...interface{}) {
 		t.Logf(format, args...)
 		t.Logf(format, args...)
 	} else if b, ok := x.(*testing.B); ok && b != nil {
 	} else if b, ok := x.(*testing.B); ok && b != nil {
 		b.Logf(format, args...)
 		b.Logf(format, args...)
-	} else if testVerbose {
+	} else { // if testing.Verbose() { // if testVerbose {
 		if len(format) == 0 || format[len(format)-1] != '\n' {
 		if len(format) == 0 || format[len(format)-1] != '\n' {
 			format = format + "\n"
 			format = format + "\n"
 		}
 		}

+ 1 - 1
codec/z_all_test.go

@@ -48,7 +48,7 @@ func testGroupResetFlags() {
 
 
 func testSuite(t *testing.T, f func(t *testing.T)) {
 func testSuite(t *testing.T, f func(t *testing.T)) {
 	// find . -name "*_test.go" | xargs grep -e 'flag.' | cut -d '&' -f 2 | cut -d ',' -f 1 | grep -e '^test'
 	// find . -name "*_test.go" | xargs grep -e 'flag.' | cut -d '&' -f 2 | cut -d ',' -f 1 | grep -e '^test'
-	// Disregard the following: testVerbose, testInitDebug, testSkipIntf, testJsonIndent (Need a test for it)
+	// Disregard the following: testInitDebug, testSkipIntf, testJsonIndent (Need a test for it)
 
 
 	testReinit() // so flag.Parse() is called first, and never called again
 	testReinit() // so flag.Parse() is called first, and never called again