Browse Source

codec: move test variables to helper_test, as benchmarks will need them also.

Ugorji Nwoke 9 years ago
parent
commit
a396ed22fc
2 changed files with 16 additions and 13 deletions
  1. 0 13
      codec/codec_test.go
  2. 16 0
      codec/helper_test.go

+ 0 - 13
codec/codec_test.go

@@ -70,19 +70,6 @@ var (
 )
 
 var (
-	testVerbose        bool
-	testInitDebug      bool
-	testUseIoEncDec    bool
-	testStructToArray  bool
-	testCanonical      bool
-	testUseReset       bool
-	testWriteNoSymbols bool
-	testSkipIntf       bool
-	testInternStr      bool
-	testUseMust        bool
-	testCheckCircRef   bool
-	testJsonIndent     int
-
 	skipVerifyVal interface{} = &(struct{}{})
 
 	testMapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil))

+ 16 - 0
codec/helper_test.go

@@ -76,6 +76,22 @@ var (
 	testHEDs []testHED
 )
 
+// variables used by tests
+var (
+	testVerbose        bool
+	testInitDebug      bool
+	testUseIoEncDec    bool
+	testStructToArray  bool
+	testCanonical      bool
+	testUseReset       bool
+	testWriteNoSymbols bool
+	testSkipIntf       bool
+	testInternStr      bool
+	testUseMust        bool
+	testCheckCircRef   bool
+	testJsonIndent     int
+)
+
 func init() {
 	testHEDs = make([]testHED, 0, 32)
 	testHandles = append(testHandles,