Browse Source

codec: support 32-bit OS for testing large containers: length should always fit in 32-bit int

Ugorji Nwoke 7 years ago
parent
commit
2af342e4e6
1 changed files with 4 additions and 3 deletions
  1. 4 3
      codec/codec_test.go

+ 4 - 3
codec/codec_test.go

@@ -1874,12 +1874,13 @@ func doTestLargeContainerLen(t *testing.T, h Handle) {
 		0, 1,
 		0, 1,
 		math.MaxInt8, math.MaxInt8 + 4, math.MaxInt8 - 4,
 		math.MaxInt8, math.MaxInt8 + 4, math.MaxInt8 - 4,
 		math.MaxInt16, math.MaxInt16 + 4, math.MaxInt16 - 4,
 		math.MaxInt16, math.MaxInt16 + 4, math.MaxInt16 - 4,
-		math.MaxInt32, math.MaxInt32 + 4, math.MaxInt32 - 4,
-		math.MaxInt64, math.MaxInt64 - 4,
+		math.MaxInt32, math.MaxInt32 - 4,
+		// math.MaxInt32 + 4, // bombs on 32-bit
+		// math.MaxInt64, math.MaxInt64 - 4, // bombs on 32-bit
 
 
 		math.MaxUint8, math.MaxUint8 + 4, math.MaxUint8 - 4,
 		math.MaxUint8, math.MaxUint8 + 4, math.MaxUint8 - 4,
 		math.MaxUint16, math.MaxUint16 + 4, math.MaxUint16 - 4,
 		math.MaxUint16, math.MaxUint16 + 4, math.MaxUint16 - 4,
-		math.MaxUint32, math.MaxUint32 + 4, math.MaxUint32 - 4,
+		// math.MaxUint32, math.MaxUint32 + 4, math.MaxUint32 - 4, // bombs on 32-bit
 	} {
 	} {
 		m[i] = make([]struct{}, i)
 		m[i] = make([]struct{}, i)
 	}
 	}