Browse Source

codec: test: move some types from values_test.go into values_flex_test.go

This is better as values_flex_test.go is the file containing
things only used by codec, while values_test.go MUST be runnable
by different encoding libraries.
Ugorji Nwoke 6 years ago
parent
commit
c14a182bc7
3 changed files with 544 additions and 488 deletions
  1. 507 452
      codec/values_codecgen_generated_test.go
  2. 37 0
      codec/values_flex_test.go
  3. 0 36
      codec/values_test.go

File diff suppressed because it is too large
+ 507 - 452
codec/values_codecgen_generated_test.go


+ 37 - 0
codec/values_flex_test.go

@@ -17,7 +17,44 @@ const teststrucflexChanCap = 64
 // that other engines may not support or may barf upon
 // that other engines may not support or may barf upon
 // e.g. custom extensions for wrapped types, maps with non-string keys, etc.
 // e.g. custom extensions for wrapped types, maps with non-string keys, etc.
 
 
+// some funky types to test codecgen
+
+type codecgenA struct {
+	ZZ []byte
+}
+type codecgenB struct {
+	AA codecgenA
+}
+type codecgenC struct {
+	_struct struct{} `codec:",omitempty"`
+	BB      codecgenB
+}
+
+type TestCodecgenG struct {
+	TestCodecgenG int
+}
+type codecgenH struct {
+	TestCodecgenG
+}
+type codecgenI struct {
+	codecgenH
+}
+
+type codecgenK struct {
+	X int
+	Y string
+}
+type codecgenL struct {
+	X int
+	Y uint32
+}
+type codecgenM struct {
+	codecgenK
+	codecgenL
+}
+
 // Some unused types just stored here
 // Some unused types just stored here
+
 type Bbool bool
 type Bbool bool
 type Aarray [1]string
 type Aarray [1]string
 type Sstring string
 type Sstring string

+ 0 - 36
codec/values_test.go

@@ -33,42 +33,6 @@ type wrapString string
 type wrapUint64Slice []wrapUint64
 type wrapUint64Slice []wrapUint64
 type wrapStringSlice []wrapString
 type wrapStringSlice []wrapString
 
 
-// some funky types to stretch codecgen
-
-type codecgenA struct {
-	ZZ []byte
-}
-type codecgenB struct {
-	AA codecgenA
-}
-type codecgenC struct {
-	_struct struct{} `codec:",omitempty"`
-	BB      codecgenB
-}
-
-type TestCodecgenG struct {
-	TestCodecgenG int
-}
-type codecgenH struct {
-	TestCodecgenG
-}
-type codecgenI struct {
-	codecgenH
-}
-
-type codecgenK struct {
-	X int
-	Y string
-}
-type codecgenL struct {
-	X int
-	Y uint32
-}
-type codecgenM struct {
-	codecgenK
-	codecgenL
-}
-
 // some other types
 // some other types
 
 
 type stringUint64T struct {
 type stringUint64T struct {

Some files were not shown because too many files changed in this diff