Forráskód Böngészése

codec: handle nil keys as valid, support MapKeyAsString in json, and indefinite lengths for string/[]byte

decode: handle nil keys as valid

    Previously, we treated a nil key as a hint to ignore the mapping.
    That is wrong.

    Instead, we treat a nil key as the zero value of the key type,
    and continue processing.

json: support MapKeyAsString option, that enforces that all map keys
    are encoded as strings.

    required moving away from some interfaces that were created just for json support: readn4, readn3, writen4, writen5

cbor: support indefinitelength for strings and []byte

misc: remove readn4, readn3, writen4, writen5 from (en|de)cDriver interfaces

expand tests
- separated alljson from json testing in suite
- mammoth-test: add a test to en/decode all slice and map types
- add more integers and floats to be tested
- add test for large containers, and for mammoth slices and maps
- updates to fix tests when running in cbor indefinite length
Ugorji Nwoke 8 éve
szülő
commit
a9859e3096

+ 40 - 9
codec/cbor.go

@@ -172,22 +172,52 @@ func (e *cborEncDriver) WriteArrayEnd() {
 	}
 }
 
-func (e *cborEncDriver) EncodeString(c charEncoding, v string) {
-	e.encLen(cborBaseString, len(v))
-	e.w.writestr(v)
+func (e *cborEncDriver) EncodeSymbol(v string) {
+	e.encStringBytesS(cborBaseString, v)
 }
 
-func (e *cborEncDriver) EncodeSymbol(v string) {
-	e.EncodeString(c_UTF8, v)
+func (e *cborEncDriver) EncodeString(c charEncoding, v string) {
+	e.encStringBytesS(cborBaseString, v)
 }
 
 func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) {
 	if c == c_RAW {
-		e.encLen(cborBaseBytes, len(v))
+		e.encStringBytesS(cborBaseBytes, stringView(v))
 	} else {
-		e.encLen(cborBaseString, len(v))
+		e.encStringBytesS(cborBaseString, stringView(v))
+	}
+}
+
+func (e *cborEncDriver) encStringBytesS(bb byte, v string) {
+	if e.h.IndefiniteLength {
+		if bb == cborBaseBytes {
+			e.w.writen1(cborBdIndefiniteBytes)
+		} else {
+			e.w.writen1(cborBdIndefiniteString)
+		}
+		blen := len(v) / 4
+		if blen == 0 {
+			blen = 64
+		} else if blen > 1024 {
+			blen = 1024
+		}
+		for i := 0; i < len(v); {
+			var v2 string
+			i2 := i + blen
+			if i2 < len(v) {
+				v2 = v[i:i2]
+			} else {
+				v2 = v[i:]
+			}
+			e.encLen(bb, len(v2))
+			e.w.writestr(v2)
+			i = i2
+		}
+		e.w.writen1(cborBdBreak)
+	} else {
+		e.encLen(bb, len(v))
+		e.w.writestr(v)
 	}
-	e.w.writeb(v)
 }
 
 // ----------------------
@@ -438,8 +468,9 @@ func (d *cborDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) {
 		return nil
 	}
 	if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString {
+		d.bdRead = false
 		if bs == nil {
-			return d.decAppendIndefiniteBytes(nil)
+			return d.decAppendIndefiniteBytes(zeroByteSlice)
 		}
 		return d.decAppendIndefiniteBytes(bs[:0])
 	}

+ 377 - 212
codec/codec_test.go

@@ -211,6 +211,15 @@ func (x *testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) {
 	}
 }
 
+func testCodecEncode(ts interface{}, bsIn []byte,
+	fn func([]byte) *bytes.Buffer, h Handle) (bs []byte, err error) {
+	return sTestCodecEncode(ts, bsIn, fn, h, h.getBasicHandle())
+}
+
+func testCodecDecode(bs []byte, ts interface{}, h Handle) (err error) {
+	return sTestCodecDecode(bs, ts, h, h.getBasicHandle())
+}
+
 func testVerifyVal(v interface{}, arg testVerifyArg) (v2 interface{}) {
 	//for python msgpack,
 	//  - all positive integers are unsigned 64-bit ints
@@ -373,7 +382,7 @@ func testInit() {
 		}
 	)
 	testSimpleH.AddExt(timeTyp, 1, timeExtEncFn, timeExtDecFn)
-
+	// testBincH.SetBytesExt(timeTyp, 1, timeExt{}) // time is builtin for binc
 	testMsgpackH.SetBytesExt(timeTyp, 1, timeExt{})
 	testCborH.SetInterfaceExt(timeTyp, 1, &testUnixNanoTimeExt{})
 	// testJsonH.SetInterfaceExt(timeTyp, 1, &testUnixNanoTimeExt{})
@@ -453,7 +462,7 @@ ugorji
 		map[interface{}]interface{}{
 			true:       "true",
 			uint8(138): false,
-			"false":    uint8(200),
+			false:      uint8(200),
 		},
 	}
 
@@ -838,6 +847,7 @@ func testCodecChan(t *testing.T, h Handle) {
 	// - do this for codecs: json, cbor (covers all types)
 
 	if true {
+		logT(t, "*int64")
 		sl1 := make([]*int64, 4)
 		for i := range sl1 {
 			var j int64 = int64(i)
@@ -863,6 +873,7 @@ func testCodecChan(t *testing.T, h Handle) {
 	}
 
 	if true {
+		logT(t, "testBytesT []byte - input []byte")
 		type testBytesT []byte
 		sl1 := make([]testBytesT, 4)
 		for i := range sl1 {
@@ -880,6 +891,7 @@ func testCodecChan(t *testing.T, h Handle) {
 		close(ch2)
 		var sl2 []testBytesT
 		for j := range ch2 {
+			// logT(t, ">>>> from chan: is nil? %v, %v", j == nil, j)
 			sl2 = append(sl2, j)
 		}
 		if err := deepEqual(sl1, sl2); err != nil {
@@ -888,6 +900,7 @@ func testCodecChan(t *testing.T, h Handle) {
 		}
 	}
 	if true {
+		logT(t, "testBytesT byte - input string/testBytesT")
 		type testBytesT byte
 		sl1 := make([]testBytesT, 4)
 		for i := range sl1 {
@@ -914,6 +927,7 @@ func testCodecChan(t *testing.T, h Handle) {
 	}
 
 	if true {
+		logT(t, "*[]byte")
 		sl1 := make([]byte, 4)
 		for i := range sl1 {
 			var j = strconv.FormatInt(int64(i), 10)[0]
@@ -1080,10 +1094,19 @@ func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) {
 		},
 	}
 	var v2 map[stringUint64T]interface{}
-	var b1, b2 []byte
+	var b1, b2, b3 []byte
 
-	// encode v1 into b1, decode b1 into v2, encode v2 into b2, compare b1 and b2
+	// encode v1 into b1, decode b1 into v2, encode v2 into b2, and compare b1 and b2.
+	// OR
+	// encode v1 into b1, decode b1 into v2, encode v2 into b2 and b3, and compare b2 and b3.
+	//   e.g. when doing cbor indefinite, we may haveto use out-of-band encoding
+	//   where each key is encoded as an indefinite length string, which makes it not the same
+	//   order as the strings were lexicographically ordered before.
 
+	var cborIndef bool
+	if ch, ok := h.(*CborHandle); ok {
+		cborIndef = ch.IndefiniteLength
+	}
 	bh := h.getBasicHandle()
 	if !bh.Canonical {
 		bh.Canonical = true
@@ -1094,10 +1117,18 @@ func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) {
 	e1.MustEncode(v1)
 	d1 := NewDecoderBytes(b1, h)
 	d1.MustDecode(&v2)
+	// testDeepEqualErr(v1, v2, t, "huh?")
 	e2 := NewEncoderBytes(&b2, h)
 	e2.MustEncode(v2)
-	if !bytes.Equal(b1, b2) {
-		logT(t, "Unequal bytes: %v VS %v", b1, b2)
+	var b1t, b2t = b1, b2
+	if cborIndef {
+		e2 = NewEncoderBytes(&b3, h)
+		e2.MustEncode(v2)
+		b1t, b2t = b2, b3
+	}
+
+	if !bytes.Equal(b1t, b2t) {
+		logT(t, "Unequal bytes: %v VS %v", b1t, b2t)
 		failT(t)
 	}
 }
@@ -1499,6 +1530,11 @@ func doTestRawExt(t *testing.T, h Handle) {
 	}
 }
 
+// func doTestTimeExt(t *testing.T, h Handle) {
+// 	var t = time.Now()
+// 	// add time ext to the handle
+// }
+
 func doTestMapStructKey(t *testing.T, h Handle) {
 	testOnce.Do(testInitAll)
 	var b []byte
@@ -1610,6 +1646,85 @@ func doTestEmbeddedFieldPrecedence(t *testing.T, h Handle) {
 	}
 }
 
+func doTestLargeContainerLen(t *testing.T, h Handle) {
+	m := make(map[int][]struct{})
+	for i := range []int{
+		0, 1,
+		math.MaxInt8, math.MaxInt8 + 4, math.MaxInt8 - 4,
+		math.MaxInt16, math.MaxInt16 + 4, math.MaxInt16 - 4,
+		math.MaxInt32, math.MaxInt32 + 4, math.MaxInt32 - 4,
+		math.MaxInt64, math.MaxInt64 - 4,
+
+		math.MaxUint8, math.MaxUint8 + 4, math.MaxUint8 - 4,
+		math.MaxUint16, math.MaxUint16 + 4, math.MaxUint16 - 4,
+		math.MaxUint32, math.MaxUint32 + 4, math.MaxUint32 - 4,
+	} {
+		m[i] = make([]struct{}, i)
+	}
+	bs, _ := testMarshalErr(m, h, t, "-")
+	var m2 = make(map[int][]struct{})
+	testUnmarshalErr(m2, bs, h, t, "-")
+	testDeepEqualErr(m, m2, t, "-")
+
+	// TODO: skip rest if 32-bit
+
+	// do same tests for large strings (encoded as symbols or not)
+	// skip if 32-bit or not using unsafe mode
+	if safeMode || (32<<(^uint(0)>>63)) < 64 {
+		return
+	}
+
+	// now, want to do tests for large strings, which
+	// could be encoded as symbols.
+	// to do this, we create a simple one-field struct,
+	// use use flags to switch from symbols to non-symbols
+
+	bh := h.getBasicHandle()
+	oldAsSymbols := bh.AsSymbols
+	defer func() { bh.AsSymbols = oldAsSymbols }()
+
+	var out []byte = make([]byte, 0, math.MaxUint16*3/2)
+	var in []byte = make([]byte, math.MaxUint16*3/2)
+	for i := range in {
+		in[i] = 'A'
+	}
+	e := NewEncoder(nil, h)
+	for _, i := range []int{
+		0, 1, 4, 8, 12, 16, 28, 32, 36,
+		math.MaxInt8, math.MaxInt8 + 4, math.MaxInt8 - 4,
+		math.MaxInt16, math.MaxInt16 + 4, math.MaxInt16 - 4,
+
+		math.MaxUint8, math.MaxUint8 + 4, math.MaxUint8 - 4,
+		math.MaxUint16, math.MaxUint16 + 4, math.MaxUint16 - 4,
+	} {
+		var m1, m2 map[string]bool
+		m1 = make(map[string]bool, 1)
+		var s1 = stringView(in[:i])
+		// fmt.Printf("testcontainerlen: large string: i: %v, |%s|\n", i, s1)
+		m1[s1] = true
+
+		bh.AsSymbols = AsSymbolNone
+		out = out[:0]
+		e.ResetBytes(&out)
+		e.MustEncode(m1)
+		// bs, _ = testMarshalErr(m1, h, t, "-")
+		m2 = make(map[string]bool, 1)
+		testUnmarshalErr(m2, out, h, t, "no-symbols")
+		testDeepEqualErr(m1, m2, t, "no-symbols")
+
+		// now, do as symbols
+		bh.AsSymbols = AsSymbolAll
+		out = out[:0]
+		e.ResetBytes(&out)
+		e.MustEncode(m1)
+		// bs, _ = testMarshalErr(m1, h, t, "-")
+		m2 = make(map[string]bool, 1)
+		testUnmarshalErr(m2, out, h, t, "symbols")
+		testDeepEqualErr(m1, m2, t, "symbols")
+	}
+
+}
+
 func testRandomFillRV(v reflect.Value) {
 	testOnce.Do(testInitAll)
 	fneg := func() int64 {
@@ -1694,6 +1809,219 @@ func testMammoth(t *testing.T, name string, h Handle) {
 
 // -----------------
 
+func TestJsonDecodeNonStringScalarInStringContext(t *testing.T) {
+	var b = `{"s.true": "true", "b.true": true, "s.false": "false", "b.false": false, "s.10": "10", "i.10": 10, "i.-10": -10}`
+	var golden = map[string]string{"s.true": "true", "b.true": "true", "s.false": "false", "b.false": "false", "s.10": "10", "i.10": "10", "i.-10": "-10"}
+
+	var m map[string]string
+	d := NewDecoderBytes([]byte(b), testJsonH)
+	d.MustDecode(&m)
+	if err := deepEqual(golden, m); err == nil {
+		logT(t, "++++ match: decoded: %#v", m)
+	} else {
+		logT(t, "---- mismatch: %v ==> golden: %#v, decoded: %#v", err, golden, m)
+		failT(t)
+	}
+}
+
+func TestJsonEncodeIndent(t *testing.T) {
+	v := TestSimplish{
+		Ii: -794,
+		Ss: `A Man is
+after the new line
+	after new line and tab
+`,
+	}
+	v2 := v
+	v.Mm = make(map[string]*TestSimplish)
+	for i := 0; i < len(v.Ar); i++ {
+		v3 := v2
+		v3.Ii += (i * 4)
+		v3.Ss = fmt.Sprintf("%d - %s", v3.Ii, v3.Ss)
+		if i%2 == 0 {
+			v.Ar[i] = &v3
+		}
+		// v3 = v2
+		v.Sl = append(v.Sl, &v3)
+		v.Mm[strconv.FormatInt(int64(i), 10)] = &v3
+	}
+	oldcan := testJsonH.Canonical
+	oldIndent := testJsonH.Indent
+	oldS2A := testJsonH.StructToArray
+	defer func() {
+		testJsonH.Canonical = oldcan
+		testJsonH.Indent = oldIndent
+		testJsonH.StructToArray = oldS2A
+	}()
+	testJsonH.Canonical = true
+	testJsonH.Indent = -1
+	testJsonH.StructToArray = false
+	var bs []byte
+	NewEncoderBytes(&bs, testJsonH).MustEncode(&v)
+	txt1Tab := string(bs)
+	bs = nil
+	testJsonH.Indent = 120
+	NewEncoderBytes(&bs, testJsonH).MustEncode(&v)
+	txtSpaces := string(bs)
+	// fmt.Printf("\n-----------\n%s\n------------\n%s\n-------------\n", txt1Tab, txtSpaces)
+
+	goldenResultTab := `{
+	"Ar": [
+		{
+			"Ar": [
+				null,
+				null
+			],
+			"Ii": -794,
+			"Mm": null,
+			"Sl": null,
+			"Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
+		},
+		null
+	],
+	"Ii": -794,
+	"Mm": {
+		"0": {
+			"Ar": [
+				null,
+				null
+			],
+			"Ii": -794,
+			"Mm": null,
+			"Sl": null,
+			"Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
+		},
+		"1": {
+			"Ar": [
+				null,
+				null
+			],
+			"Ii": -790,
+			"Mm": null,
+			"Sl": null,
+			"Ss": "-790 - A Man is\nafter the new line\n\tafter new line and tab\n"
+		}
+	},
+	"Sl": [
+		{
+			"Ar": [
+				null,
+				null
+			],
+			"Ii": -794,
+			"Mm": null,
+			"Sl": null,
+			"Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
+		},
+		{
+			"Ar": [
+				null,
+				null
+			],
+			"Ii": -790,
+			"Mm": null,
+			"Sl": null,
+			"Ss": "-790 - A Man is\nafter the new line\n\tafter new line and tab\n"
+		}
+	],
+	"Ss": "A Man is\nafter the new line\n\tafter new line and tab\n"
+}`
+
+	if txt1Tab != goldenResultTab {
+		logT(t, "decoded indented with tabs != expected: \nexpected: %s\nencoded: %s", goldenResultTab, txt1Tab)
+		failT(t)
+	}
+	if txtSpaces != strings.Replace(goldenResultTab, "\t", strings.Repeat(" ", 120), -1) {
+		logT(t, "decoded indented with spaces != expected: \nexpected: %s\nencoded: %s", goldenResultTab, txtSpaces)
+		failT(t)
+	}
+}
+
+func TestBufioDecReader(t *testing.T) {
+	// try to read 85 bytes in chunks of 7 at a time.
+	var s = strings.Repeat("01234'56789      ", 5)
+	// fmt.Printf("s: %s\n", s)
+	var r = strings.NewReader(s)
+	var br = &bufioDecReader{r: r, buf: make([]byte, 0, 13)}
+	b, err := ioutil.ReadAll(br)
+	if err != nil {
+		panic(err)
+	}
+	var s2 = string(b)
+	// fmt.Printf("s==s2: %v, len(s): %v, len(b): %v, len(s2): %v\n", s == s2, len(s), len(b), len(s2))
+	if s != s2 {
+		logT(t, "not equal: \ns:  %s\ns2: %s", s, s2)
+		failT(t)
+	}
+	// Now, test search functions for skip, readTo and readUntil
+	// readUntil ', readTo ', skip whitespace. 3 times in a loop, each time compare the token and/or outs
+	// readUntil: see: 56789
+	var out []byte
+	var token byte
+	br = &bufioDecReader{r: strings.NewReader(s), buf: make([]byte, 0, 7)}
+	// println()
+	for _, v2 := range [...]string{
+		`01234'`,
+		`56789      01234'`,
+		`56789      01234'`,
+		`56789      01234'`,
+	} {
+		out = br.readUntil(nil, '\'')
+		testDeepEqualErr(string(out), v2, t, "-")
+		// fmt.Printf("readUntil: out: `%s`\n", out)
+	}
+	br = &bufioDecReader{r: strings.NewReader(s), buf: make([]byte, 0, 7)}
+	// println()
+	for range [4]struct{}{} {
+		out = br.readTo(nil, &jsonNumSet)
+		testDeepEqualErr(string(out), `01234`, t, "-")
+		// fmt.Printf("readTo: out: `%s`\n", out)
+		out = br.readUntil(nil, '\'')
+		testDeepEqualErr(string(out), "'", t, "-")
+		// fmt.Printf("readUntil: out: `%s`\n", out)
+		out = br.readTo(nil, &jsonNumSet)
+		testDeepEqualErr(string(out), `56789`, t, "-")
+		// fmt.Printf("readTo: out: `%s`\n", out)
+		out = br.readUntil(nil, '0')
+		testDeepEqualErr(string(out), `      0`, t, "-")
+		// fmt.Printf("readUntil: out: `%s`\n", out)
+		br.UnreadByte()
+	}
+	br = &bufioDecReader{r: strings.NewReader(s), buf: make([]byte, 0, 7)}
+	// println()
+	for range [4]struct{}{} {
+		out = br.readUntil(nil, ' ')
+		testDeepEqualErr(string(out), `01234'56789 `, t, "-")
+		// fmt.Printf("readUntil: out: |%s|\n", out)
+		token = br.skip(&jsonCharWhitespaceSet)
+		testDeepEqualErr(token, byte('0'), t, "-")
+		// fmt.Printf("skip: token: '%c'\n", token)
+		br.UnreadByte()
+	}
+	// println()
+}
+
+// -----------
+
+func TestJsonLargeInteger(t *testing.T) {
+	for _, i := range []uint8{'L', 'A', 0} {
+		for _, j := range []interface{}{
+			int64(1 << 60),
+			-int64(1 << 60),
+			0,
+			1 << 20,
+			-(1 << 20),
+			uint64(1 << 60),
+			uint(0),
+			uint(1 << 20),
+		} {
+			doTestJsonLargeInteger(t, j, i)
+		}
+	}
+}
+
+// ----------
+
 func TestBincCodecsTable(t *testing.T) {
 	testCodecTableOne(t, testBincH)
 }
@@ -1963,213 +2291,44 @@ func TestSimpleEmbeddedFieldPrecedence(t *testing.T) {
 	doTestEmbeddedFieldPrecedence(t, testSimpleH)
 }
 
-func TestJsonLargeInteger(t *testing.T) {
-	for _, i := range []uint8{'L', 'A', 0} {
-		for _, j := range []interface{}{
-			int64(1 << 60),
-			-int64(1 << 60),
-			0,
-			1 << 20,
-			-(1 << 20),
-			uint64(1 << 60),
-			uint(0),
-			uint(1 << 20),
-		} {
-			doTestJsonLargeInteger(t, j, i)
-		}
-	}
+func TestJsonLargeContainerLen(t *testing.T) {
+	doTestLargeContainerLen(t, testJsonH)
 }
 
-func TestJsonDecodeNonStringScalarInStringContext(t *testing.T) {
-	var b = `{"s.true": "true", "b.true": true, "s.false": "false", "b.false": false, "s.10": "10", "i.10": 10, "i.-10": -10}`
-	var golden = map[string]string{"s.true": "true", "b.true": "true", "s.false": "false", "b.false": "false", "s.10": "10", "i.10": "10", "i.-10": "-10"}
+func TestCborLargeContainerLen(t *testing.T) {
+	doTestLargeContainerLen(t, testCborH)
+}
 
-	var m map[string]string
-	d := NewDecoderBytes([]byte(b), testJsonH)
-	d.MustDecode(&m)
-	if err := deepEqual(golden, m); err == nil {
-		logT(t, "++++ match: decoded: %#v", m)
-	} else {
-		logT(t, "---- mismatch: %v ==> golden: %#v, decoded: %#v", err, golden, m)
-		failT(t)
-	}
+func TestMsgpackLargeContainerLen(t *testing.T) {
+	doTestLargeContainerLen(t, testMsgpackH)
 }
 
-func TestJsonEncodeIndent(t *testing.T) {
-	v := TestSimplish{
-		Ii: -794,
-		Ss: `A Man is
-after the new line
-	after new line and tab
-`,
-	}
-	v2 := v
-	v.Mm = make(map[string]*TestSimplish)
-	for i := 0; i < len(v.Ar); i++ {
-		v3 := v2
-		v3.Ii += (i * 4)
-		v3.Ss = fmt.Sprintf("%d - %s", v3.Ii, v3.Ss)
-		if i%2 == 0 {
-			v.Ar[i] = &v3
-		}
-		// v3 = v2
-		v.Sl = append(v.Sl, &v3)
-		v.Mm[strconv.FormatInt(int64(i), 10)] = &v3
-	}
-	oldcan := testJsonH.Canonical
-	oldIndent := testJsonH.Indent
-	oldS2A := testJsonH.StructToArray
-	defer func() {
-		testJsonH.Canonical = oldcan
-		testJsonH.Indent = oldIndent
-		testJsonH.StructToArray = oldS2A
-	}()
-	testJsonH.Canonical = true
-	testJsonH.Indent = -1
-	testJsonH.StructToArray = false
-	var bs []byte
-	NewEncoderBytes(&bs, testJsonH).MustEncode(&v)
-	txt1Tab := string(bs)
-	bs = nil
-	testJsonH.Indent = 120
-	NewEncoderBytes(&bs, testJsonH).MustEncode(&v)
-	txtSpaces := string(bs)
-	// fmt.Printf("\n-----------\n%s\n------------\n%s\n-------------\n", txt1Tab, txtSpaces)
+func TestBincLargeContainerLen(t *testing.T) {
+	doTestLargeContainerLen(t, testBincH)
+}
 
-	goldenResultTab := `{
-	"Ar": [
-		{
-			"Ar": [
-				null,
-				null
-			],
-			"Ii": -794,
-			"Mm": null,
-			"Sl": null,
-			"Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
-		},
-		null
-	],
-	"Ii": -794,
-	"Mm": {
-		"0": {
-			"Ar": [
-				null,
-				null
-			],
-			"Ii": -794,
-			"Mm": null,
-			"Sl": null,
-			"Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
-		},
-		"1": {
-			"Ar": [
-				null,
-				null
-			],
-			"Ii": -790,
-			"Mm": null,
-			"Sl": null,
-			"Ss": "-790 - A Man is\nafter the new line\n\tafter new line and tab\n"
-		}
-	},
-	"Sl": [
-		{
-			"Ar": [
-				null,
-				null
-			],
-			"Ii": -794,
-			"Mm": null,
-			"Sl": null,
-			"Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
-		},
-		{
-			"Ar": [
-				null,
-				null
-			],
-			"Ii": -790,
-			"Mm": null,
-			"Sl": null,
-			"Ss": "-790 - A Man is\nafter the new line\n\tafter new line and tab\n"
-		}
-	],
-	"Ss": "A Man is\nafter the new line\n\tafter new line and tab\n"
-}`
+func TestSimpleLargeContainerLen(t *testing.T) {
+	doTestLargeContainerLen(t, testSimpleH)
+}
 
-	if txt1Tab != goldenResultTab {
-		logT(t, "decoded indented with tabs != expected: \nexpected: %s\nencoded: %s", goldenResultTab, txt1Tab)
-		failT(t)
-	}
-	if txtSpaces != strings.Replace(goldenResultTab, "\t", strings.Repeat(" ", 120), -1) {
-		logT(t, "decoded indented with spaces != expected: \nexpected: %s\nencoded: %s", goldenResultTab, txtSpaces)
-		failT(t)
-	}
+func TestJsonMammothMapsAndSlices(t *testing.T) {
+	doTestMammothMapsAndSlices(t, testJsonH)
 }
 
-func TestBufioDecReader(t *testing.T) {
-	// try to read 85 bytes in chunks of 7 at a time.
-	var s = strings.Repeat("01234'56789      ", 5)
-	// fmt.Printf("s: %s\n", s)
-	var r = strings.NewReader(s)
-	var br = &bufioDecReader{r: r, buf: make([]byte, 0, 13)}
-	b, err := ioutil.ReadAll(br)
-	if err != nil {
-		panic(err)
-	}
-	var s2 = string(b)
-	// fmt.Printf("s==s2: %v, len(s): %v, len(b): %v, len(s2): %v\n", s == s2, len(s), len(b), len(s2))
-	if s != s2 {
-		logT(t, "not equal: \ns:  %s\ns2: %s", s, s2)
-		failT(t)
-	}
-	// Now, test search functions for skip, readTo and readUntil
-	// readUntil ', readTo ', skip whitespace. 3 times in a loop, each time compare the token and/or outs
-	// readUntil: see: 56789
-	var out []byte
-	var token byte
-	br = &bufioDecReader{r: strings.NewReader(s), buf: make([]byte, 0, 7)}
-	// println()
-	for _, v2 := range [...]string{
-		`01234'`,
-		`56789      01234'`,
-		`56789      01234'`,
-		`56789      01234'`,
-	} {
-		out = br.readUntil(nil, '\'')
-		testDeepEqualErr(string(out), v2, t, "-")
-		// fmt.Printf("readUntil: out: `%s`\n", out)
-	}
-	br = &bufioDecReader{r: strings.NewReader(s), buf: make([]byte, 0, 7)}
-	// println()
-	for range [4]struct{}{} {
-		out = br.readTo(nil, &jsonNumSet)
-		testDeepEqualErr(string(out), `01234`, t, "-")
-		// fmt.Printf("readTo: out: `%s`\n", out)
-		out = br.readUntil(nil, '\'')
-		testDeepEqualErr(string(out), "'", t, "-")
-		// fmt.Printf("readUntil: out: `%s`\n", out)
-		out = br.readTo(nil, &jsonNumSet)
-		testDeepEqualErr(string(out), `56789`, t, "-")
-		// fmt.Printf("readTo: out: `%s`\n", out)
-		out = br.readUntil(nil, '0')
-		testDeepEqualErr(string(out), `      0`, t, "-")
-		// fmt.Printf("readUntil: out: `%s`\n", out)
-		br.UnreadByte()
-	}
-	br = &bufioDecReader{r: strings.NewReader(s), buf: make([]byte, 0, 7)}
-	// println()
-	for range [4]struct{}{} {
-		out = br.readUntil(nil, ' ')
-		testDeepEqualErr(string(out), `01234'56789 `, t, "-")
-		// fmt.Printf("readUntil: out: |%s|\n", out)
-		token = br.skip(&jsonCharWhitespaceSet)
-		testDeepEqualErr(token, byte('0'), t, "-")
-		// fmt.Printf("skip: token: '%c'\n", token)
-		br.UnreadByte()
-	}
-	// println()
+func TestCborMammothMapsAndSlices(t *testing.T) {
+	doTestMammothMapsAndSlices(t, testCborH)
+}
+
+func TestMsgpackMammothMapsAndSlices(t *testing.T) {
+	doTestMammothMapsAndSlices(t, testMsgpackH)
+}
+
+func TestBincMammothMapsAndSlices(t *testing.T) {
+	doTestMammothMapsAndSlices(t, testBincH)
+}
+
+func TestSimpleMammothMapsAndSlices(t *testing.T) {
+	doTestMammothMapsAndSlices(t, testSimpleH)
 }
 
 // TODO:
@@ -2191,18 +2350,24 @@ func TestBufioDecReader(t *testing.T) {
 //   - bad input with large array length prefix
 //
 //  More tests:
+//  - large integers x: int64 and uint64
+//    x = 0, -1, 1, maxUint8, maxUint16, maxuint32
+//    maxUint8 < x < maxUint16
+//    maxUint16 < x < maxuint32
+//    x > maxuint32
+//  - standard floats x: float32 and float64
+//    0, -1, 1, +inf, -inf, etc
 //  - length of containers (array, string, bytes, map):
+//    container == nil
 //    len = 0
+//  - length of containers (array, string, bytes, map):
+//    len = maxUint8, maxUint16, maxuint32
+//    maxUint8 < len < maxUint16
 //    maxUint16 < len < maxuint32
 //    len > maxuint32
-//  - large numbers: in every range: up to maxuint8, maxuint16, maxuint32, maxuint64
-//    int64
-//    uint64
-//  - standard numbers:
-//    0, -1, 1, +inf, -inf, 0.0f, etc
-//  - (encode ext, encode raw ext, etc)
-//    (include extensions)
+//  - (encode extensions: ext, raw ext, etc)
 //  - tracking:
 //    z.trb: track, stop track, check
 //  - test with diff: mapType and sliceType, and decodeNaked
-//  - decodeAsNil: for maps, slices, etc
+//  - extension that isn't builtin e.g. type uint64Ext uint64.
+//    it encodes as a uint64.

+ 18 - 68
codec/decode.go

@@ -39,9 +39,6 @@ type decReader interface {
 	readx(n int) []byte
 	readb([]byte)
 	readn1() uint8
-	readn3() (uint8, uint8, uint8)
-	readn4() (uint8, uint8, uint8, uint8)
-	// readn1eof() (v uint8, eof bool)
 	numread() int // number of bytes read
 	track()
 	stopTrack() []byte
@@ -54,11 +51,6 @@ type decReader interface {
 	readUntil(in []byte, stop byte) (out []byte)
 }
 
-// type decReaderByteScanner interface {
-// 	io.Reader
-// 	io.ByteScanner
-// }
-
 type decDriver interface {
 	// this will check if the next token is a break.
 	CheckBreak() bool
@@ -397,16 +389,6 @@ func (z *bufioDecReader) readn1() (b uint8) {
 	return
 }
 
-func (z *bufioDecReader) readn3() (b1, b2, b3 uint8) {
-	z.readb(z.b[:3])
-	return z.b[0], z.b[1], z.b[2]
-}
-
-func (z *bufioDecReader) readn4() (b1, b2, b3, b4 uint8) {
-	z.readb(z.b[:4])
-	return z.b[0], z.b[1], z.b[2], z.b[3]
-}
-
 func (z *bufioDecReader) search(in []byte, accept *bitset256, stop, flag uint8) (token byte, out []byte) {
 	// flag: 1 (skip), 2 (readTo), 4 (readUntil)
 	if flag == 4 {
@@ -692,16 +674,6 @@ func (z *ioDecReader) readn1() (b uint8) {
 	panic(err)
 }
 
-func (z *ioDecReader) readn3() (b1, b2, b3 uint8) {
-	z.readb(z.b[:3])
-	return z.b[0], z.b[1], z.b[2]
-}
-
-func (z *ioDecReader) readn4() (b1, b2, b3, b4 uint8) {
-	z.readb(z.b[:4])
-	return z.b[0], z.b[1], z.b[2], z.b[3]
-}
-
 func (z *ioDecReader) skip(accept *bitset256) (token byte) {
 	for {
 		var eof bool
@@ -836,31 +808,6 @@ func (z *bytesDecReader) readn1() (v uint8) {
 	return
 }
 
-func (z *bytesDecReader) readn3() (b1, b2, b3 uint8) {
-	if 3 > z.a {
-		panic(io.ErrUnexpectedEOF)
-	}
-	b3 = z.b[z.c+2]
-	b2 = z.b[z.c+1]
-	b1 = z.b[z.c]
-	z.c += 3
-	z.a -= 3
-	return
-}
-
-func (z *bytesDecReader) readn4() (b1, b2, b3, b4 uint8) {
-	if 4 > z.a {
-		panic(io.ErrUnexpectedEOF)
-	}
-	b4 = z.b[z.c+3]
-	b3 = z.b[z.c+2]
-	b2 = z.b[z.c+1]
-	b1 = z.b[z.c]
-	z.c += 4
-	z.a -= 4
-	return
-}
-
 // func (z *bytesDecReader) readn1eof() (v uint8, eof bool) {
 // 	if z.a == 0 {
 // 		eof = true
@@ -1554,22 +1501,20 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) {
 	hasLen := containerLen > 0
 	var kstrbs []byte
 	for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
-		if elemsep {
-			dd.ReadMapElemKey()
-		}
-		// if a nil key, just ignore the mapped value and continue
-		if dd.TryDecodeAsNil() {
-			if elemsep {
-				dd.ReadMapElemValue()
-			}
-			d.swallow()
-			continue
-		}
 		if rvkMut || !rvkp.IsValid() {
 			rvkp = reflect.New(ktype)
 			rvk = rvkp.Elem()
 		}
-		if ktypeIsString {
+		if elemsep {
+			dd.ReadMapElemKey()
+		}
+		if dd.TryDecodeAsNil() {
+			// Previously, if a nil key, we just ignored the mapped value and continued.
+			// However, that makes the result of encoding and then decoding map[intf]intf{nil:nil}
+			// to be an empty map.
+			// Instead, we treat a nil key as the zero value of the type.
+			rvk.Set(reflect.Zero(ktype))
+		} else if ktypeIsString {
 			kstrbs = dd.DecodeStringAsBytes()
 			rvk.SetString(stringView(kstrbs))
 			// NOTE: if doing an insert, you MUST use a real string (not stringview)
@@ -1589,9 +1534,11 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) {
 		}
 		// special case if a byte array.
 		if ktypeIsIntf {
-			rvk = rvk.Elem()
-			if rvk.Type() == uint8SliceTyp {
-				rvk = reflect.ValueOf(d.string(rvk.Bytes()))
+			if rvk2 := rvk.Elem(); rvk2.IsValid() {
+				rvk = rvk2
+				if rvk.Type() == uint8SliceTyp {
+					rvk = reflect.ValueOf(d.string(rvk.Bytes()))
+				}
 			}
 		}
 
@@ -2458,6 +2405,9 @@ func decInferLen(clen, maxlen, unit int) (rvlen int) {
 	if clen <= 0 {
 		return
 	}
+	if unit == 0 {
+		return clen
+	}
 	if maxlen <= 0 {
 		// no maxlen defined. Use maximum of 256K memory, with a floor of 4K items.
 		// maxlen = 256 * 1024 / unit

+ 7 - 38
codec/encode.go

@@ -43,8 +43,6 @@ type encWriter interface {
 	writestr(string)
 	writen1(byte)
 	writen2(byte, byte)
-	writen4(byte, byte, byte, byte)
-	writen5(byte, byte, byte, byte, byte)
 	atEndOfEncode()
 }
 
@@ -71,6 +69,7 @@ type encDriver interface {
 	EncodeString(c charEncoding, v string)
 	EncodeSymbol(v string)
 	EncodeStringBytes(c charEncoding, v []byte)
+
 	//TODO
 	//encBignum(f *big.Int)
 	//encStringRunes(c charEncoding, v []rune)
@@ -260,19 +259,12 @@ func (z *ioEncWriter) writen2(b1, b2 byte) {
 	panic(err)
 }
 
-func (z *ioEncWriter) writen4(b1, b2, b3, b4 byte) {
-	z.b[0], z.b[1], z.b[2], z.b[3] = b1, b2, b3, b4
-	if _, err := z.ww.Write(z.b[:4]); err != nil {
-		panic(err)
-	}
-}
-
-func (z *ioEncWriter) writen5(b1, b2, b3, b4, b5 byte) {
-	z.b[0], z.b[1], z.b[2], z.b[3], z.b[4] = b1, b2, b3, b4, b5
-	if _, err := z.ww.Write(z.b[:5]); err != nil {
-		panic(err)
-	}
-}
+// func (z *ioEncWriter) writen5(b1, b2, b3, b4, b5 byte) {
+// 	z.b[0], z.b[1], z.b[2], z.b[3], z.b[4] = b1, b2, b3, b4, b5
+// 	if _, err := z.ww.Write(z.b[:5]); err != nil {
+// 		panic(err)
+// 	}
+// }
 
 func (z *ioEncWriter) atEndOfEncode() {
 	if z.fw != nil {
@@ -323,29 +315,6 @@ func (z *bytesEncWriter) writen2(b1, b2 byte) {
 	z.b[oc] = b1
 }
 
-func (z *bytesEncWriter) writen4(b1, b2, b3, b4 byte) {
-	oc, a := z.growNoAlloc(4)
-	if a {
-		z.growAlloc(4, oc)
-	}
-	z.b[oc+3] = b4
-	z.b[oc+2] = b3
-	z.b[oc+1] = b2
-	z.b[oc] = b1
-}
-
-func (z *bytesEncWriter) writen5(b1, b2, b3, b4, b5 byte) {
-	oc, a := z.growNoAlloc(5)
-	if a {
-		z.growAlloc(5, oc)
-	}
-	z.b[oc+4] = b5
-	z.b[oc+3] = b4
-	z.b[oc+2] = b3
-	z.b[oc+1] = b2
-	z.b[oc] = b1
-}
-
 func (z *bytesEncWriter) atEndOfEncode() {
 	*(z.out) = z.b[:z.c]
 }

+ 0 - 5
codec/gen-helper.generated.go

@@ -42,11 +42,6 @@ func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) {
 	return genHelperDecoder{d: d}, d.d
 }
 
-// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.
-func BasicHandleDoNotUse(h Handle) *BasicHandle {
-	return h.getBasicHandle()
-}
-
 // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
 type genHelperEncoder struct {
 	e *Encoder

+ 0 - 176
codec/gen-helper.go.tmpl

@@ -42,11 +42,6 @@ func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) {
 	return genHelperDecoder{d:d}, d.d 
 }
 
-// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.
-func BasicHandleDoNotUse(h Handle) *BasicHandle {
-     return h.getBasicHandle()
-}
-
 // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
 type genHelperEncoder struct {
 	e *Encoder
@@ -121,14 +116,6 @@ func (f genHelperEncoder) EncExt(v interface{}) (r bool) {
 	}
 	return false 
 }
-{{/*
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncSendContainerState(c containerState) {
-	if f.e.cr != nil {
-		f.e.cr.sendContainerState(c)
-	}
-}
-*/}}
 
 // ---------------- DECODER FOLLOWS -----------------
 
@@ -230,167 +217,4 @@ func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) {
 func (f genHelperDecoder) StringView(v []byte) string {
 	return stringView(v)
 }
-{{/*
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecSendContainerState(c containerState) {
-	if f.d.cr != nil {
-		f.d.cr.sendContainerState(c)
-	}
-}
-*/}}
 
-{{/*
-
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncDriver() encDriver {
-	return f.e.e
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecDriver() decDriver {
-     return f.d.d
-}
-
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncNil() {
-	f.e.e.EncodeNil()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncBytes(v []byte) {
-	f.e.e.EncodeStringBytes(c_RAW, v)
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncArrayStart(length int) {
-	f.e.e.EncodeArrayStart(length)
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncArrayEnd() {
-	f.e.e.EncodeArrayEnd()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncArrayEntrySeparator() {
-	f.e.e.EncodeArrayEntrySeparator()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncMapStart(length int) {
-	f.e.e.EncodeMapStart(length)
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncMapEnd() {
-	f.e.e.EncodeMapEnd()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncMapEntrySeparator() {
-	f.e.e.EncodeMapEntrySeparator()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) EncMapKVSeparator() {
-	f.e.e.EncodeMapKVSeparator()
-}
-
-// ---------
-
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecBytes(v *[]byte) {
-	*v = f.d.d.DecodeBytes(*v)
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecTryNil() bool {
-	return f.d.d.TryDecodeAsNil()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecContainerIsNil() (b bool) {
-	return f.d.d.IsContainerType(valueTypeNil)
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecContainerIsMap() (b bool) {
-	return f.d.d.IsContainerType(valueTypeMap)
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecContainerIsArray() (b bool) {
-	return f.d.d.IsContainerType(valueTypeArray)
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecCheckBreak() bool {
-	return f.d.d.CheckBreak()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecMapStart() int {
-	return f.d.d.ReadMapStart()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecArrayStart() int {
-	return f.d.d.ReadArrayStart()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecMapEnd() {
-	f.d.d.ReadMapEnd()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecArrayEnd() {
-	f.d.d.ReadArrayEnd()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecArrayEntrySeparator() {
-	f.d.d.ReadArrayEntrySeparator()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecMapEntrySeparator() {
-	f.d.d.ReadMapEntrySeparator()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) DecMapKVSeparator() {
-	f.d.d.ReadMapKVSeparator()
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) ReadStringAsBytes(bs []byte) []byte {
-	return f.d.d.DecodeStringAsBytes(bs)
-}
-
-
-// -- encode calls (primitives)
-{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) {{ .MethodNamePfx "Enc" true }}(v {{ .Primitive }}) {
-	ee := f.e.e
-	{{ encmd .Primitive "v" }}
-}
-{{ end }}{{ end }}{{ end }}
-
-// -- decode calls (primitives)
-{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) {{ .MethodNamePfx "Dec" true }}(vp *{{ .Primitive }}) {
-	dd := f.d.d
-	*vp = {{ decmd .Primitive }}
-}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperDecoder) {{ .MethodNamePfx "Read" true }}() (v {{ .Primitive }}) {
-	dd := f.d.d
-	v = {{ decmd .Primitive }}
-	return
-}
-{{ end }}{{ end }}{{ end }}
-
-
-// -- encode calls (slices/maps)
-{{range .Values}}{{if not .Primitive }}{{if .Slice }}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v []{{ .Elem }}) { {{ else }}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v map[{{ .MapKey }}]{{ .Elem }}) { {{end}}
-	f.F.{{ .MethodNamePfx "Enc" false }}V(v, false, f.e)
-}
-{{ end }}{{ end }}
-
-// -- decode calls (slices/maps) 
-{{range .Values}}{{if not .Primitive }}
-// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
-{{if .Slice }}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *[]{{ .Elem }}) { 
-{{else}}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *map[{{ .MapKey }}]{{ .Elem }}) { {{end}}
-	v, changed := f.F.{{ .MethodNamePfx "Dec" false }}V(*vp, false, true, f.d)
-	if changed {
-		*vp = v 
-	}
-}
-{{ end }}{{ end }}
-*/}}

+ 2 - 0
codec/helper_not_unsafe.go

@@ -10,6 +10,8 @@ import (
 	"sync/atomic"
 )
 
+const safeMode = true
+
 // stringView returns a view of the []byte as a string.
 // In unsafe mode, it doesn't incur allocation and copying caused by conversion.
 // In regular safe mode, it is an allocation and copy.

+ 1 - 0
codec/helper_unsafe.go

@@ -18,6 +18,7 @@ import (
 
 // var zeroRTv [4]uintptr
 
+const safeMode = false
 const unsafeFlagIndir = 1 << 7 // keep in sync with GO_ROOT/src/reflect/value.go
 
 type unsafeString struct {

+ 174 - 187
codec/json.go

@@ -42,9 +42,28 @@ import (
 
 //--------------------------------
 
-var (
-	// jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'}
+var jsonLiterals = [...]byte{
+	'"',
+	't', 'r', 'u', 'e',
+	'"',
+	'"',
+	'f', 'a', 'l', 's', 'e',
+	'"',
+	'"',
+	'n', 'u', 'l', 'l',
+	'"',
+}
 
+const (
+	jsonLitTrueQ  = 0
+	jsonLitTrue   = 1
+	jsonLitFalseQ = 6
+	jsonLitFalse  = 7
+	jsonLitNullQ  = 13
+	jsonLitNull   = 14
+)
+
+var (
 	// jsonFloat64Pow10 = [...]float64{
 	// 	1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
 	// 	1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
@@ -88,6 +107,8 @@ const (
 	jsonSpacesOrTabsLen = 128
 
 	jsonU4SetErrVal = 128
+
+	jsonAlwaysReturnInternString = false
 )
 
 func init() {
@@ -230,49 +251,6 @@ func (e *jsonEncDriver) WriteMapEnd() {
 	e.c = containerMapEnd
 }
 
-// func (e *jsonEncDriver) sendContainerState(c containerState) {
-// 	// determine whether to output separators
-// 	switch c {
-// 	case containerMapKey:
-// 		if e.c != containerMapStart {
-// 			e.w.writen1(',')
-// 		}
-// 		if e.d {
-// 			e.writeIndent()
-// 		}
-// 	case containerMapValue:
-// 		if e.d {
-// 			e.w.writen2(':', ' ')
-// 		} else {
-// 			e.w.writen1(':')
-// 		}
-// 	case containerMapEnd:
-// 		if e.d {
-// 			e.dl--
-// 			if e.c != containerMapStart {
-// 				e.writeIndent()
-// 			}
-// 		}
-// 		e.w.writen1('}')
-// 	case containerArrayElem:
-// 		if e.c != containerArrayStart {
-// 			e.w.writen1(',')
-// 		}
-// 		if e.d {
-// 			e.writeIndent()
-// 		}
-// 	case containerArrayEnd:
-// 		if e.d {
-// 			e.dl--
-// 			if e.c != containerArrayStart {
-// 				e.writeIndent()
-// 			}
-// 		}
-// 		e.w.writen1(']')
-// 	}
-// 	e.c = c
-// }
-
 func (e *jsonEncDriver) writeIndent() {
 	e.w.writen1('\n')
 	if x := len(e.ds) * int(e.dl); x <= jsonSpacesOrTabsLen {
@@ -289,14 +267,31 @@ func (e *jsonEncDriver) writeIndent() {
 }
 
 func (e *jsonEncDriver) EncodeNil() {
-	e.w.writen4('n', 'u', 'l', 'l') // e.w.writeb(jsonLiterals[9:13]) // null
+	// We always encode nil as just null (never in quotes)
+	// This allows us to easily decode if a nil in the json stream
+	// ie if initial token is n.
+	e.w.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4])
+
+	// if e.h.MapKeyAsString && e.c == containerMapKey {
+	// 	e.w.writeb(jsonLiterals[jsonLitNullQ : jsonLitNullQ+6])
+	// } else {
+	// 	e.w.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4])
+	// }
 }
 
 func (e *jsonEncDriver) EncodeBool(b bool) {
-	if b {
-		e.w.writen4('t', 'r', 'u', 'e') // e.w.writeb(jsonLiterals[0:4]) // true
+	if e.h.MapKeyAsString && e.c == containerMapKey {
+		if b {
+			e.w.writeb(jsonLiterals[jsonLitTrueQ : jsonLitTrueQ+6])
+		} else {
+			e.w.writeb(jsonLiterals[jsonLitFalseQ : jsonLitFalseQ+7])
+		}
 	} else {
-		e.w.writen5('f', 'a', 'l', 's', 'e') // e.w.writeb(jsonLiterals[4:9]) // false
+		if b {
+			e.w.writeb(jsonLiterals[jsonLitTrue : jsonLitTrue+4])
+		} else {
+			e.w.writeb(jsonLiterals[jsonLitFalse : jsonLitFalse+5])
+		}
 	}
 }
 
@@ -309,29 +304,52 @@ func (e *jsonEncDriver) EncodeFloat64(f float64) {
 }
 
 func (e *jsonEncDriver) encodeFloat(f float64, numbits int) {
-	x := strconv.AppendFloat(e.b[:0], f, 'G', -1, numbits)
-	// if bytes.IndexByte(x, 'E') == -1 && bytes.IndexByte(x, '.') == -1 {
-	if !jsonIsFloatBytesB2(x) {
-		x = append(x, '.', '0')
+	var blen int
+	var x []byte
+	if e.h.MapKeyAsString && e.c == containerMapKey {
+		e.b[0] = '"'
+		x = strconv.AppendFloat(e.b[1:1], f, 'G', -1, numbits)
+		blen = 1 + len(x)
+		if jsonIsFloatBytesB2(x) {
+			e.b[blen] = '"'
+			blen += 1
+		} else {
+			e.b[blen] = '.'
+			e.b[blen+1] = '0'
+			e.b[blen+2] = '"'
+			blen += 3
+		}
+	} else {
+		x = strconv.AppendFloat(e.b[:0], f, 'G', -1, numbits)
+		blen = len(x)
+		if !jsonIsFloatBytesB2(x) {
+			e.b[blen] = '.'
+			e.b[blen+1] = '0'
+			blen += 2
+		}
 	}
-	e.w.writeb(x)
+	e.w.writeb(e.b[:blen])
 }
 
 func (e *jsonEncDriver) EncodeInt(v int64) {
-	if x := e.h.IntegerAsString; x == 'A' || x == 'L' && (v > 1<<53 || v < -(1<<53)) {
-		e.w.writen1('"')
-		e.w.writeb(strconv.AppendInt(e.b[:0], v, 10))
-		e.w.writen1('"')
+	x := e.h.IntegerAsString
+	if x == 'A' || x == 'L' && (v > 1<<53 || v < -(1<<53)) || (e.h.MapKeyAsString && e.c == containerMapKey) {
+		blen := 2 + len(strconv.AppendInt(e.b[1:1], v, 10))
+		e.b[0] = '"'
+		e.b[blen-1] = '"'
+		e.w.writeb(e.b[:blen])
 		return
 	}
 	e.w.writeb(strconv.AppendInt(e.b[:0], v, 10))
 }
 
 func (e *jsonEncDriver) EncodeUint(v uint64) {
-	if x := e.h.IntegerAsString; x == 'A' || x == 'L' && v > 1<<53 {
-		e.w.writen1('"')
-		e.w.writeb(strconv.AppendUint(e.b[:0], v, 10))
-		e.w.writen1('"')
+	x := e.h.IntegerAsString
+	if x == 'A' || x == 'L' && v > 1<<53 || (e.h.MapKeyAsString && e.c == containerMapKey) {
+		blen := 2 + len(strconv.AppendUint(e.b[1:1], v, 10))
+		e.b[0] = '"'
+		e.b[blen-1] = '"'
+		e.w.writeb(e.b[:blen])
 		return
 	}
 	e.w.writeb(strconv.AppendUint(e.b[:0], v, 10))
@@ -339,7 +357,7 @@ func (e *jsonEncDriver) EncodeUint(v uint64) {
 
 func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) {
 	if v := ext.ConvertExt(rv); v == nil {
-		e.w.writen4('n', 'u', 'l', 'l') // e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil()
+		e.EncodeNil()
 	} else {
 		en.encode(v)
 	}
@@ -348,7 +366,7 @@ func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Enco
 func (e *jsonEncDriver) EncodeRawExt(re *RawExt, en *Encoder) {
 	// only encodes re.Value (never re.Data)
 	if re.Value == nil {
-		e.w.writen4('n', 'u', 'l', 'l') // e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil()
+		e.EncodeNil()
 	} else {
 		en.encode(re.Value)
 	}
@@ -609,59 +627,11 @@ func (d *jsonDecDriver) ReadMapEnd() {
 // 	d.c = c
 // }
 
-// func (d *jsonDecDriver) sendContainerState(c containerState) {
-// 	if d.tok == 0 {
-// 		d.tok = d.r.skip(&jsonCharWhitespaceSet)
-// 	}
-// 	var xc uint8 // char expected
-// 	switch c {
-// 	case containerMapKey:
-// 		if d.c != containerMapStart {
-// 			xc = ','
-// 		}
-// 	case containerMapValue:
-// 		xc = ':'
-// 	case containerMapEnd:
-// 		xc = '}'
-// 	case containerArrayElem:
-// 		if d.c != containerArrayStart {
-// 			xc = ','
-// 		}
-// 	case containerArrayEnd:
-// 		xc = ']'
-// 	}
-// 	if xc != 0 {
-// 		if d.tok != xc {
-// 			d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok)
-// 		}
-// 		d.tok = 0
-// 	}
-// 	d.c = c
-// }
-
-// func (d *jsonDecDriver) readLiteralIdx(fromIdx, toIdx uint8) {
-// 	bs := d.r.readx(int(toIdx - fromIdx))
-// 	d.tok = 0
-// 	if jsonValidateSymbols && !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) {
-// 		d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs)
-// 		return
-// 	}
-// }
-
-func (d *jsonDecDriver) readSymbol3(v1, v2, v3 uint8) {
-	b1, b2, b3 := d.r.readn3()
-	d.tok = 0
-	if jsonValidateSymbols && (b1 != v1 || b2 != v2 || b3 != v3) {
-		d.d.errorf("json: expecting %c, %c, %c: got %c, %c, %c", b1, b2, b3, v1, v2, v3)
-		return
-	}
-}
-
-func (d *jsonDecDriver) readSymbol4(v1, v2, v3, v4 uint8) {
-	b1, b2, b3, b4 := d.r.readn4()
+func (d *jsonDecDriver) readLit(length, fromIdx uint8) {
+	bs := d.r.readx(int(length))
 	d.tok = 0
-	if jsonValidateSymbols && (b1 != v1 || b2 != v2 || b3 != v3 || b4 != v4) {
-		d.d.errorf("json: expecting %c, %c, %c, %c: got %c, %c, %c, %c", b1, b2, b3, b4, v1, v2, v3, v4)
+	if jsonValidateSymbols && !bytes.Equal(bs, jsonLiterals[fromIdx:fromIdx+length]) {
+		d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:fromIdx+length], bs)
 		return
 	}
 }
@@ -670,27 +640,38 @@ func (d *jsonDecDriver) TryDecodeAsNil() bool {
 	if d.tok == 0 {
 		d.tok = d.r.skip(&jsonCharWhitespaceSet)
 	}
+	// TODO: we shouldn't try to see if "null" was here, right?
+	// only "null" denotes a nil
 	if d.tok == 'n' {
-		d.readSymbol3('u', 'l', 'l') // d.readLiteralIdx(10, 13) // ull
+		d.readLit(3, jsonLitNull+1) // ull
 		return true
 	}
 	return false
 }
 
-func (d *jsonDecDriver) DecodeBool() bool {
+func (d *jsonDecDriver) DecodeBool() (v bool) {
 	if d.tok == 0 {
 		d.tok = d.r.skip(&jsonCharWhitespaceSet)
 	}
-	if d.tok == 'f' {
-		d.readSymbol4('a', 'l', 's', 'e') // d.readLiteralIdx(5, 9) // alse
-		return false
+	fquot := d.c == containerMapKey && d.tok == '"'
+	if fquot {
+		d.tok = d.r.readn1()
 	}
-	if d.tok == 't' {
-		d.readSymbol3('r', 'u', 'e') // d.readLiteralIdx(1, 4) // rue
-		return true
+	switch d.tok {
+	case 'f':
+		d.readLit(4, jsonLitFalse+1) // alse
+		// v = false
+	case 't':
+		d.readLit(3, jsonLitTrue+1) // rue
+		v = true
+	default:
+		d.d.errorf("json: decode bool: got first char %c", d.tok)
+		// v = false // "unreachable"
+	}
+	if fquot {
+		d.r.readn1()
 	}
-	d.d.errorf("json: decode bool: got first char %c", d.tok)
-	return false // "unreachable"
+	return
 }
 
 func (d *jsonDecDriver) ContainerType() (vt valueType) {
@@ -813,15 +794,9 @@ func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) {
 	return
 }
 
-const jsonAlwaysReturnInternString = false
-
 func (d *jsonDecDriver) DecodeString() (s string) {
 	d.appendStringAsBytes()
-	// if x := d.s.sc; x != nil && x.so && x.st == '}' { // map key
-	if jsonAlwaysReturnInternString || d.c == containerMapKey {
-		return d.d.string(d.bs)
-	}
-	return string(d.bs)
+	return d.bsToString()
 }
 
 func (d *jsonDecDriver) DecodeStringAsBytes() (s []byte) {
@@ -840,15 +815,15 @@ func (d *jsonDecDriver) appendStringAsBytes() {
 		// handle non-string scalar: null, true, false or a number
 		switch d.tok {
 		case 'n':
-			d.readSymbol3('u', 'l', 'l') // d.readLiteralIdx(10, 13) // ull
+			d.readLit(3, jsonLitNull+1) // ull
 			d.bs = d.bs[:0]
 			d.fnull = true
 		case 'f':
-			d.readSymbol4('a', 'l', 's', 'e') // d.readLiteralIdx(5, 9) // alse
+			d.readLit(4, jsonLitFalse+1) // alse
 			d.bs = d.bs[:5]
 			copy(d.bs, "false")
 		case 't':
-			d.readSymbol3('r', 'u', 'e') // d.readLiteralIdx(1, 4) // rue
+			d.readLit(3, jsonLitTrue+1) // rue
 			d.bs = d.bs[:4]
 			copy(d.bs, "true")
 		default:
@@ -946,24 +921,34 @@ func (d *jsonDecDriver) appendStringAsBytes() {
 	d.bs = v
 }
 
-// func (d *jsonDecDriver) jsonU4Arr(bs [4]byte) (r rune) {
-// 	// u, _ := strconv.ParseUint(string(d.bstr[:4]), 16, 64)
-// 	var u uint32
-// 	for _, v := range bs {
-// 		if '0' <= v && v <= '9' {
-// 			v = v - '0'
-// 		} else if 'a' <= v && v <= 'f' {
-// 			v = v - 'a' + 10
-// 		} else if 'A' <= v && v <= 'f' {
-// 			v = v - 'A' + 10
-// 		} else {
-// 			// d.d.errorf(`json: unquoteStr: invalid hex char in \u unicode sequence: %q`, v)
-// 			return utf8.RuneError
-// 		}
-// 		u = u*16 + uint32(v)
-// 	}
-// 	return rune(u)
-// }
+func (d *jsonDecDriver) nakedNum(z *decNaked, bs []byte) (err error) {
+	if d.h.PreferFloat || jsonIsFloatBytesB3(bs) { // bytes.IndexByte(bs, '.') != -1 ||...
+		// } else if d.h.PreferFloat || bytes.ContainsAny(bs, ".eE") {
+		z.v = valueTypeFloat
+		z.f, err = strconv.ParseFloat(stringView(bs), 64)
+	} else if d.h.SignedInteger || bs[0] == '-' {
+		z.v = valueTypeInt
+		z.i, err = strconv.ParseInt(stringView(bs), 10, 64)
+	} else {
+		z.v = valueTypeUint
+		z.u, err = strconv.ParseUint(stringView(bs), 10, 64)
+	}
+	if err != nil && z.v != valueTypeFloat {
+		if v, ok := err.(*strconv.NumError); ok && (v.Err == strconv.ErrRange || v.Err == strconv.ErrSyntax) {
+			z.v = valueTypeFloat
+			z.f, err = strconv.ParseFloat(stringView(bs), 64)
+		}
+	}
+	return
+}
+
+func (d *jsonDecDriver) bsToString() string {
+	// if x := d.s.sc; x != nil && x.so && x.st == '}' { // map key
+	if jsonAlwaysReturnInternString || d.c == containerMapKey {
+		return d.d.string(d.bs)
+	}
+	return string(d.bs)
+}
 
 func (d *jsonDecDriver) DecodeNaked() {
 	z := d.d.n
@@ -974,14 +959,14 @@ func (d *jsonDecDriver) DecodeNaked() {
 	}
 	switch d.tok {
 	case 'n':
-		d.readSymbol3('u', 'l', 'l') // d.readLiteralIdx(10, 13) // ull
+		d.readLit(3, jsonLitNull+1) // ull
 		z.v = valueTypeNil
 	case 'f':
-		d.readSymbol4('a', 'l', 's', 'e') // d.readLiteralIdx(5, 9) // alse
+		d.readLit(4, jsonLitFalse+1) // alse
 		z.v = valueTypeBool
 		z.b = false
 	case 't':
-		d.readSymbol3('r', 'u', 'e') // d.readLiteralIdx(1, 4) // rue
+		d.readLit(3, jsonLitTrue+1) // rue
 		z.v = valueTypeBool
 		z.b = true
 	case '{':
@@ -989,36 +974,38 @@ func (d *jsonDecDriver) DecodeNaked() {
 	case '[':
 		z.v = valueTypeArray // don't consume. kInterfaceNaked will call ReadArrayStart
 	case '"':
-		z.v = valueTypeString
-		z.s = d.DecodeString()
+		// if a string, and MapKeyAsString, then try to decode it as a nil, bool or number first
+		d.appendStringAsBytes()
+		if len(d.bs) > 0 && d.c == containerMapKey && d.h.MapKeyAsString {
+			switch stringView(d.bs) {
+			case "null":
+				z.v = valueTypeNil
+			case "true":
+				z.v = valueTypeBool
+				z.b = true
+			case "false":
+				z.v = valueTypeBool
+				z.b = false
+			default:
+				// check if a number: float, int or uint
+				if err := d.nakedNum(z, d.bs); err != nil {
+					z.v = valueTypeString
+					z.s = d.bsToString()
+				}
+			}
+		} else {
+			z.v = valueTypeString
+			z.s = d.bsToString()
+		}
 	default: // number
 		bs := d.decNumBytes()
-		var err error
 		if len(bs) == 0 {
 			d.d.errorf("json: decode number from empty string")
 			return
-		} else if d.h.PreferFloat || jsonIsFloatBytesB3(bs) { // bytes.IndexByte(bs, '.') != -1 ||...
-			// } else if d.h.PreferFloat || bytes.ContainsAny(bs, ".eE") {
-			z.v = valueTypeFloat
-			z.f, err = strconv.ParseFloat(stringView(bs), 64)
-		} else if d.h.SignedInteger || bs[0] == '-' {
-			z.v = valueTypeInt
-			z.i, err = strconv.ParseInt(stringView(bs), 10, 64)
-		} else {
-			z.v = valueTypeUint
-			z.u, err = strconv.ParseUint(stringView(bs), 10, 64)
 		}
-		if err != nil {
-			if z.v == valueTypeInt || z.v == valueTypeUint {
-				if v, ok := err.(*strconv.NumError); ok && (v.Err == strconv.ErrRange || v.Err == strconv.ErrSyntax) {
-					z.v = valueTypeFloat
-					z.f, err = strconv.ParseFloat(stringView(bs), 64)
-				}
-			}
-			if err != nil {
-				d.d.errorf("json: decode number from %s: %v", bs, err)
-				return
-			}
+		if err := d.nakedNum(z, bs); err != nil {
+			d.d.errorf("json: decode number from %s: %v", bs, err)
+			return
 		}
 	}
 	// if decodeFurther {
@@ -1088,6 +1075,12 @@ type JsonHandle struct {
 	// The whitespace is important, especially if using numbers in a context
 	// where multiple items are written to a stream.
 	TermWhitespace bool
+
+	// MapKeyAsString says to encode all map keys as strings.
+	//
+	// Use this to enforce strict json output.
+	// The only caveat is that nil value is ALWAYS written as null (never as "null")
+	MapKeyAsString bool
 }
 
 func (h *JsonHandle) hasElemSeparators() bool { return true }
@@ -1162,11 +1155,5 @@ func jsonIsFloatBytesB3(bs []byte) bool {
 		bytes.IndexByte(bs, 'e') != -1
 }
 
-// var jsonEncodeTerminate = []byte{' '}
-
-// func (h *JsonHandle) rpcEncodeTerminate() []byte {
-// 	return jsonEncodeTerminate
-// }
-
 var _ decDriver = (*jsonDecDriver)(nil)
 var _ encDriver = (*jsonEncDriver)(nil)

+ 38 - 0
codec/mammoth-test.go.tmpl

@@ -8,6 +8,8 @@
 
 package codec
 
+import "testing"
+
 // TestMammoth has all the different paths optimized in fast-path
 // It has all the primitives, slices and maps.
 // 
@@ -31,3 +33,39 @@ type TestMammoth struct {
 {{end}}{{end}}{{end}}
 
 }
+
+func doTestMammothSlices(t *testing.T, h Handle) {
+{{range $i, $e := .Values }}{{if not .Primitive }}{{if not .MapKey }}{{/*
+*/}}
+	v{{$i}}v1 := []{{ .Elem }}{ {{ zerocmd .Elem }}, {{ zerocmd .Elem }} }
+	bs{{$i}}, _ := testMarshalErr(v{{$i}}v1, h, t, "-")
+	v{{$i}}v2 := make([]{{ .Elem }}, 2)
+	testUnmarshalErr(v{{$i}}v2, bs{{$i}}, h, t, "-")
+	testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "-")
+	bs{{$i}}, _ = testMarshalErr(&v{{$i}}v1, h, t, "-")
+	v{{$i}}v2 = nil
+	testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "-")
+	testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "-")
+{{end}}{{end}}{{end}}
+}
+
+func doTestMammothMaps(t *testing.T, h Handle) {
+{{range $i, $e := .Values }}{{if not .Primitive }}{{if .MapKey }}{{/*
+*/}}
+	v{{$i}}v1 := map[{{ .MapKey }}]{{ .Elem }}{ {{ zerocmd .MapKey }}:{{ zerocmd .Elem }} }
+	bs{{$i}}, _ := testMarshalErr(v{{$i}}v1, h, t, "-")
+	v{{$i}}v2 := make(map[{{ .MapKey }}]{{ .Elem }})
+	testUnmarshalErr(v{{$i}}v2, bs{{$i}}, h, t, "-")
+	testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "-")
+	bs{{$i}}, _ = testMarshalErr(&v{{$i}}v1, h, t, "-")
+	v{{$i}}v2 = nil
+	testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "-")
+	testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "-")
+{{end}}{{end}}{{end}}
+
+}
+
+func doTestMammothMapsAndSlices(t *testing.T, h Handle) {
+     doTestMammothSlices(t, h)
+     doTestMammothMaps(t, h)
+}

+ 2725 - 0
codec/mammoth_generated_test.go

@@ -8,6 +8,8 @@
 
 package codec
 
+import "testing"
+
 // TestMammoth has all the different paths optimized in fast-path
 // It has all the primitives, slices and maps.
 //
@@ -591,3 +593,2726 @@ type TestMammoth struct {
 	FMapBoolBool          map[bool]bool
 	FptrMapBoolBool       *map[bool]bool
 }
+
+func doTestMammothSlices(t *testing.T, h Handle) {
+
+	v1v1 := []interface{}{nil, nil}
+	bs1, _ := testMarshalErr(v1v1, h, t, "-")
+	v1v2 := make([]interface{}, 2)
+	testUnmarshalErr(v1v2, bs1, h, t, "-")
+	testDeepEqualErr(v1v1, v1v2, t, "-")
+	bs1, _ = testMarshalErr(&v1v1, h, t, "-")
+	v1v2 = nil
+	testUnmarshalErr(&v1v2, bs1, h, t, "-")
+	testDeepEqualErr(v1v1, v1v2, t, "-")
+
+	v19v1 := []string{"", ""}
+	bs19, _ := testMarshalErr(v19v1, h, t, "-")
+	v19v2 := make([]string, 2)
+	testUnmarshalErr(v19v2, bs19, h, t, "-")
+	testDeepEqualErr(v19v1, v19v2, t, "-")
+	bs19, _ = testMarshalErr(&v19v1, h, t, "-")
+	v19v2 = nil
+	testUnmarshalErr(&v19v2, bs19, h, t, "-")
+	testDeepEqualErr(v19v1, v19v2, t, "-")
+
+	v37v1 := []float32{0, 0}
+	bs37, _ := testMarshalErr(v37v1, h, t, "-")
+	v37v2 := make([]float32, 2)
+	testUnmarshalErr(v37v2, bs37, h, t, "-")
+	testDeepEqualErr(v37v1, v37v2, t, "-")
+	bs37, _ = testMarshalErr(&v37v1, h, t, "-")
+	v37v2 = nil
+	testUnmarshalErr(&v37v2, bs37, h, t, "-")
+	testDeepEqualErr(v37v1, v37v2, t, "-")
+
+	v55v1 := []float64{0, 0}
+	bs55, _ := testMarshalErr(v55v1, h, t, "-")
+	v55v2 := make([]float64, 2)
+	testUnmarshalErr(v55v2, bs55, h, t, "-")
+	testDeepEqualErr(v55v1, v55v2, t, "-")
+	bs55, _ = testMarshalErr(&v55v1, h, t, "-")
+	v55v2 = nil
+	testUnmarshalErr(&v55v2, bs55, h, t, "-")
+	testDeepEqualErr(v55v1, v55v2, t, "-")
+
+	v73v1 := []uint{0, 0}
+	bs73, _ := testMarshalErr(v73v1, h, t, "-")
+	v73v2 := make([]uint, 2)
+	testUnmarshalErr(v73v2, bs73, h, t, "-")
+	testDeepEqualErr(v73v1, v73v2, t, "-")
+	bs73, _ = testMarshalErr(&v73v1, h, t, "-")
+	v73v2 = nil
+	testUnmarshalErr(&v73v2, bs73, h, t, "-")
+	testDeepEqualErr(v73v1, v73v2, t, "-")
+
+	v108v1 := []uint16{0, 0}
+	bs108, _ := testMarshalErr(v108v1, h, t, "-")
+	v108v2 := make([]uint16, 2)
+	testUnmarshalErr(v108v2, bs108, h, t, "-")
+	testDeepEqualErr(v108v1, v108v2, t, "-")
+	bs108, _ = testMarshalErr(&v108v1, h, t, "-")
+	v108v2 = nil
+	testUnmarshalErr(&v108v2, bs108, h, t, "-")
+	testDeepEqualErr(v108v1, v108v2, t, "-")
+
+	v126v1 := []uint32{0, 0}
+	bs126, _ := testMarshalErr(v126v1, h, t, "-")
+	v126v2 := make([]uint32, 2)
+	testUnmarshalErr(v126v2, bs126, h, t, "-")
+	testDeepEqualErr(v126v1, v126v2, t, "-")
+	bs126, _ = testMarshalErr(&v126v1, h, t, "-")
+	v126v2 = nil
+	testUnmarshalErr(&v126v2, bs126, h, t, "-")
+	testDeepEqualErr(v126v1, v126v2, t, "-")
+
+	v144v1 := []uint64{0, 0}
+	bs144, _ := testMarshalErr(v144v1, h, t, "-")
+	v144v2 := make([]uint64, 2)
+	testUnmarshalErr(v144v2, bs144, h, t, "-")
+	testDeepEqualErr(v144v1, v144v2, t, "-")
+	bs144, _ = testMarshalErr(&v144v1, h, t, "-")
+	v144v2 = nil
+	testUnmarshalErr(&v144v2, bs144, h, t, "-")
+	testDeepEqualErr(v144v1, v144v2, t, "-")
+
+	v162v1 := []uintptr{0, 0}
+	bs162, _ := testMarshalErr(v162v1, h, t, "-")
+	v162v2 := make([]uintptr, 2)
+	testUnmarshalErr(v162v2, bs162, h, t, "-")
+	testDeepEqualErr(v162v1, v162v2, t, "-")
+	bs162, _ = testMarshalErr(&v162v1, h, t, "-")
+	v162v2 = nil
+	testUnmarshalErr(&v162v2, bs162, h, t, "-")
+	testDeepEqualErr(v162v1, v162v2, t, "-")
+
+	v180v1 := []int{0, 0}
+	bs180, _ := testMarshalErr(v180v1, h, t, "-")
+	v180v2 := make([]int, 2)
+	testUnmarshalErr(v180v2, bs180, h, t, "-")
+	testDeepEqualErr(v180v1, v180v2, t, "-")
+	bs180, _ = testMarshalErr(&v180v1, h, t, "-")
+	v180v2 = nil
+	testUnmarshalErr(&v180v2, bs180, h, t, "-")
+	testDeepEqualErr(v180v1, v180v2, t, "-")
+
+	v198v1 := []int8{0, 0}
+	bs198, _ := testMarshalErr(v198v1, h, t, "-")
+	v198v2 := make([]int8, 2)
+	testUnmarshalErr(v198v2, bs198, h, t, "-")
+	testDeepEqualErr(v198v1, v198v2, t, "-")
+	bs198, _ = testMarshalErr(&v198v1, h, t, "-")
+	v198v2 = nil
+	testUnmarshalErr(&v198v2, bs198, h, t, "-")
+	testDeepEqualErr(v198v1, v198v2, t, "-")
+
+	v216v1 := []int16{0, 0}
+	bs216, _ := testMarshalErr(v216v1, h, t, "-")
+	v216v2 := make([]int16, 2)
+	testUnmarshalErr(v216v2, bs216, h, t, "-")
+	testDeepEqualErr(v216v1, v216v2, t, "-")
+	bs216, _ = testMarshalErr(&v216v1, h, t, "-")
+	v216v2 = nil
+	testUnmarshalErr(&v216v2, bs216, h, t, "-")
+	testDeepEqualErr(v216v1, v216v2, t, "-")
+
+	v234v1 := []int32{0, 0}
+	bs234, _ := testMarshalErr(v234v1, h, t, "-")
+	v234v2 := make([]int32, 2)
+	testUnmarshalErr(v234v2, bs234, h, t, "-")
+	testDeepEqualErr(v234v1, v234v2, t, "-")
+	bs234, _ = testMarshalErr(&v234v1, h, t, "-")
+	v234v2 = nil
+	testUnmarshalErr(&v234v2, bs234, h, t, "-")
+	testDeepEqualErr(v234v1, v234v2, t, "-")
+
+	v252v1 := []int64{0, 0}
+	bs252, _ := testMarshalErr(v252v1, h, t, "-")
+	v252v2 := make([]int64, 2)
+	testUnmarshalErr(v252v2, bs252, h, t, "-")
+	testDeepEqualErr(v252v1, v252v2, t, "-")
+	bs252, _ = testMarshalErr(&v252v1, h, t, "-")
+	v252v2 = nil
+	testUnmarshalErr(&v252v2, bs252, h, t, "-")
+	testDeepEqualErr(v252v1, v252v2, t, "-")
+
+	v270v1 := []bool{false, false}
+	bs270, _ := testMarshalErr(v270v1, h, t, "-")
+	v270v2 := make([]bool, 2)
+	testUnmarshalErr(v270v2, bs270, h, t, "-")
+	testDeepEqualErr(v270v1, v270v2, t, "-")
+	bs270, _ = testMarshalErr(&v270v1, h, t, "-")
+	v270v2 = nil
+	testUnmarshalErr(&v270v2, bs270, h, t, "-")
+	testDeepEqualErr(v270v1, v270v2, t, "-")
+
+}
+
+func doTestMammothMaps(t *testing.T, h Handle) {
+
+	v2v1 := map[interface{}]interface{}{nil: nil}
+	bs2, _ := testMarshalErr(v2v1, h, t, "-")
+	v2v2 := make(map[interface{}]interface{})
+	testUnmarshalErr(v2v2, bs2, h, t, "-")
+	testDeepEqualErr(v2v1, v2v2, t, "-")
+	bs2, _ = testMarshalErr(&v2v1, h, t, "-")
+	v2v2 = nil
+	testUnmarshalErr(&v2v2, bs2, h, t, "-")
+	testDeepEqualErr(v2v1, v2v2, t, "-")
+
+	v3v1 := map[interface{}]string{nil: ""}
+	bs3, _ := testMarshalErr(v3v1, h, t, "-")
+	v3v2 := make(map[interface{}]string)
+	testUnmarshalErr(v3v2, bs3, h, t, "-")
+	testDeepEqualErr(v3v1, v3v2, t, "-")
+	bs3, _ = testMarshalErr(&v3v1, h, t, "-")
+	v3v2 = nil
+	testUnmarshalErr(&v3v2, bs3, h, t, "-")
+	testDeepEqualErr(v3v1, v3v2, t, "-")
+
+	v4v1 := map[interface{}]uint{nil: 0}
+	bs4, _ := testMarshalErr(v4v1, h, t, "-")
+	v4v2 := make(map[interface{}]uint)
+	testUnmarshalErr(v4v2, bs4, h, t, "-")
+	testDeepEqualErr(v4v1, v4v2, t, "-")
+	bs4, _ = testMarshalErr(&v4v1, h, t, "-")
+	v4v2 = nil
+	testUnmarshalErr(&v4v2, bs4, h, t, "-")
+	testDeepEqualErr(v4v1, v4v2, t, "-")
+
+	v5v1 := map[interface{}]uint8{nil: 0}
+	bs5, _ := testMarshalErr(v5v1, h, t, "-")
+	v5v2 := make(map[interface{}]uint8)
+	testUnmarshalErr(v5v2, bs5, h, t, "-")
+	testDeepEqualErr(v5v1, v5v2, t, "-")
+	bs5, _ = testMarshalErr(&v5v1, h, t, "-")
+	v5v2 = nil
+	testUnmarshalErr(&v5v2, bs5, h, t, "-")
+	testDeepEqualErr(v5v1, v5v2, t, "-")
+
+	v6v1 := map[interface{}]uint16{nil: 0}
+	bs6, _ := testMarshalErr(v6v1, h, t, "-")
+	v6v2 := make(map[interface{}]uint16)
+	testUnmarshalErr(v6v2, bs6, h, t, "-")
+	testDeepEqualErr(v6v1, v6v2, t, "-")
+	bs6, _ = testMarshalErr(&v6v1, h, t, "-")
+	v6v2 = nil
+	testUnmarshalErr(&v6v2, bs6, h, t, "-")
+	testDeepEqualErr(v6v1, v6v2, t, "-")
+
+	v7v1 := map[interface{}]uint32{nil: 0}
+	bs7, _ := testMarshalErr(v7v1, h, t, "-")
+	v7v2 := make(map[interface{}]uint32)
+	testUnmarshalErr(v7v2, bs7, h, t, "-")
+	testDeepEqualErr(v7v1, v7v2, t, "-")
+	bs7, _ = testMarshalErr(&v7v1, h, t, "-")
+	v7v2 = nil
+	testUnmarshalErr(&v7v2, bs7, h, t, "-")
+	testDeepEqualErr(v7v1, v7v2, t, "-")
+
+	v8v1 := map[interface{}]uint64{nil: 0}
+	bs8, _ := testMarshalErr(v8v1, h, t, "-")
+	v8v2 := make(map[interface{}]uint64)
+	testUnmarshalErr(v8v2, bs8, h, t, "-")
+	testDeepEqualErr(v8v1, v8v2, t, "-")
+	bs8, _ = testMarshalErr(&v8v1, h, t, "-")
+	v8v2 = nil
+	testUnmarshalErr(&v8v2, bs8, h, t, "-")
+	testDeepEqualErr(v8v1, v8v2, t, "-")
+
+	v9v1 := map[interface{}]uintptr{nil: 0}
+	bs9, _ := testMarshalErr(v9v1, h, t, "-")
+	v9v2 := make(map[interface{}]uintptr)
+	testUnmarshalErr(v9v2, bs9, h, t, "-")
+	testDeepEqualErr(v9v1, v9v2, t, "-")
+	bs9, _ = testMarshalErr(&v9v1, h, t, "-")
+	v9v2 = nil
+	testUnmarshalErr(&v9v2, bs9, h, t, "-")
+	testDeepEqualErr(v9v1, v9v2, t, "-")
+
+	v10v1 := map[interface{}]int{nil: 0}
+	bs10, _ := testMarshalErr(v10v1, h, t, "-")
+	v10v2 := make(map[interface{}]int)
+	testUnmarshalErr(v10v2, bs10, h, t, "-")
+	testDeepEqualErr(v10v1, v10v2, t, "-")
+	bs10, _ = testMarshalErr(&v10v1, h, t, "-")
+	v10v2 = nil
+	testUnmarshalErr(&v10v2, bs10, h, t, "-")
+	testDeepEqualErr(v10v1, v10v2, t, "-")
+
+	v11v1 := map[interface{}]int8{nil: 0}
+	bs11, _ := testMarshalErr(v11v1, h, t, "-")
+	v11v2 := make(map[interface{}]int8)
+	testUnmarshalErr(v11v2, bs11, h, t, "-")
+	testDeepEqualErr(v11v1, v11v2, t, "-")
+	bs11, _ = testMarshalErr(&v11v1, h, t, "-")
+	v11v2 = nil
+	testUnmarshalErr(&v11v2, bs11, h, t, "-")
+	testDeepEqualErr(v11v1, v11v2, t, "-")
+
+	v12v1 := map[interface{}]int16{nil: 0}
+	bs12, _ := testMarshalErr(v12v1, h, t, "-")
+	v12v2 := make(map[interface{}]int16)
+	testUnmarshalErr(v12v2, bs12, h, t, "-")
+	testDeepEqualErr(v12v1, v12v2, t, "-")
+	bs12, _ = testMarshalErr(&v12v1, h, t, "-")
+	v12v2 = nil
+	testUnmarshalErr(&v12v2, bs12, h, t, "-")
+	testDeepEqualErr(v12v1, v12v2, t, "-")
+
+	v13v1 := map[interface{}]int32{nil: 0}
+	bs13, _ := testMarshalErr(v13v1, h, t, "-")
+	v13v2 := make(map[interface{}]int32)
+	testUnmarshalErr(v13v2, bs13, h, t, "-")
+	testDeepEqualErr(v13v1, v13v2, t, "-")
+	bs13, _ = testMarshalErr(&v13v1, h, t, "-")
+	v13v2 = nil
+	testUnmarshalErr(&v13v2, bs13, h, t, "-")
+	testDeepEqualErr(v13v1, v13v2, t, "-")
+
+	v14v1 := map[interface{}]int64{nil: 0}
+	bs14, _ := testMarshalErr(v14v1, h, t, "-")
+	v14v2 := make(map[interface{}]int64)
+	testUnmarshalErr(v14v2, bs14, h, t, "-")
+	testDeepEqualErr(v14v1, v14v2, t, "-")
+	bs14, _ = testMarshalErr(&v14v1, h, t, "-")
+	v14v2 = nil
+	testUnmarshalErr(&v14v2, bs14, h, t, "-")
+	testDeepEqualErr(v14v1, v14v2, t, "-")
+
+	v15v1 := map[interface{}]float32{nil: 0}
+	bs15, _ := testMarshalErr(v15v1, h, t, "-")
+	v15v2 := make(map[interface{}]float32)
+	testUnmarshalErr(v15v2, bs15, h, t, "-")
+	testDeepEqualErr(v15v1, v15v2, t, "-")
+	bs15, _ = testMarshalErr(&v15v1, h, t, "-")
+	v15v2 = nil
+	testUnmarshalErr(&v15v2, bs15, h, t, "-")
+	testDeepEqualErr(v15v1, v15v2, t, "-")
+
+	v16v1 := map[interface{}]float64{nil: 0}
+	bs16, _ := testMarshalErr(v16v1, h, t, "-")
+	v16v2 := make(map[interface{}]float64)
+	testUnmarshalErr(v16v2, bs16, h, t, "-")
+	testDeepEqualErr(v16v1, v16v2, t, "-")
+	bs16, _ = testMarshalErr(&v16v1, h, t, "-")
+	v16v2 = nil
+	testUnmarshalErr(&v16v2, bs16, h, t, "-")
+	testDeepEqualErr(v16v1, v16v2, t, "-")
+
+	v17v1 := map[interface{}]bool{nil: false}
+	bs17, _ := testMarshalErr(v17v1, h, t, "-")
+	v17v2 := make(map[interface{}]bool)
+	testUnmarshalErr(v17v2, bs17, h, t, "-")
+	testDeepEqualErr(v17v1, v17v2, t, "-")
+	bs17, _ = testMarshalErr(&v17v1, h, t, "-")
+	v17v2 = nil
+	testUnmarshalErr(&v17v2, bs17, h, t, "-")
+	testDeepEqualErr(v17v1, v17v2, t, "-")
+
+	v20v1 := map[string]interface{}{"": nil}
+	bs20, _ := testMarshalErr(v20v1, h, t, "-")
+	v20v2 := make(map[string]interface{})
+	testUnmarshalErr(v20v2, bs20, h, t, "-")
+	testDeepEqualErr(v20v1, v20v2, t, "-")
+	bs20, _ = testMarshalErr(&v20v1, h, t, "-")
+	v20v2 = nil
+	testUnmarshalErr(&v20v2, bs20, h, t, "-")
+	testDeepEqualErr(v20v1, v20v2, t, "-")
+
+	v21v1 := map[string]string{"": ""}
+	bs21, _ := testMarshalErr(v21v1, h, t, "-")
+	v21v2 := make(map[string]string)
+	testUnmarshalErr(v21v2, bs21, h, t, "-")
+	testDeepEqualErr(v21v1, v21v2, t, "-")
+	bs21, _ = testMarshalErr(&v21v1, h, t, "-")
+	v21v2 = nil
+	testUnmarshalErr(&v21v2, bs21, h, t, "-")
+	testDeepEqualErr(v21v1, v21v2, t, "-")
+
+	v22v1 := map[string]uint{"": 0}
+	bs22, _ := testMarshalErr(v22v1, h, t, "-")
+	v22v2 := make(map[string]uint)
+	testUnmarshalErr(v22v2, bs22, h, t, "-")
+	testDeepEqualErr(v22v1, v22v2, t, "-")
+	bs22, _ = testMarshalErr(&v22v1, h, t, "-")
+	v22v2 = nil
+	testUnmarshalErr(&v22v2, bs22, h, t, "-")
+	testDeepEqualErr(v22v1, v22v2, t, "-")
+
+	v23v1 := map[string]uint8{"": 0}
+	bs23, _ := testMarshalErr(v23v1, h, t, "-")
+	v23v2 := make(map[string]uint8)
+	testUnmarshalErr(v23v2, bs23, h, t, "-")
+	testDeepEqualErr(v23v1, v23v2, t, "-")
+	bs23, _ = testMarshalErr(&v23v1, h, t, "-")
+	v23v2 = nil
+	testUnmarshalErr(&v23v2, bs23, h, t, "-")
+	testDeepEqualErr(v23v1, v23v2, t, "-")
+
+	v24v1 := map[string]uint16{"": 0}
+	bs24, _ := testMarshalErr(v24v1, h, t, "-")
+	v24v2 := make(map[string]uint16)
+	testUnmarshalErr(v24v2, bs24, h, t, "-")
+	testDeepEqualErr(v24v1, v24v2, t, "-")
+	bs24, _ = testMarshalErr(&v24v1, h, t, "-")
+	v24v2 = nil
+	testUnmarshalErr(&v24v2, bs24, h, t, "-")
+	testDeepEqualErr(v24v1, v24v2, t, "-")
+
+	v25v1 := map[string]uint32{"": 0}
+	bs25, _ := testMarshalErr(v25v1, h, t, "-")
+	v25v2 := make(map[string]uint32)
+	testUnmarshalErr(v25v2, bs25, h, t, "-")
+	testDeepEqualErr(v25v1, v25v2, t, "-")
+	bs25, _ = testMarshalErr(&v25v1, h, t, "-")
+	v25v2 = nil
+	testUnmarshalErr(&v25v2, bs25, h, t, "-")
+	testDeepEqualErr(v25v1, v25v2, t, "-")
+
+	v26v1 := map[string]uint64{"": 0}
+	bs26, _ := testMarshalErr(v26v1, h, t, "-")
+	v26v2 := make(map[string]uint64)
+	testUnmarshalErr(v26v2, bs26, h, t, "-")
+	testDeepEqualErr(v26v1, v26v2, t, "-")
+	bs26, _ = testMarshalErr(&v26v1, h, t, "-")
+	v26v2 = nil
+	testUnmarshalErr(&v26v2, bs26, h, t, "-")
+	testDeepEqualErr(v26v1, v26v2, t, "-")
+
+	v27v1 := map[string]uintptr{"": 0}
+	bs27, _ := testMarshalErr(v27v1, h, t, "-")
+	v27v2 := make(map[string]uintptr)
+	testUnmarshalErr(v27v2, bs27, h, t, "-")
+	testDeepEqualErr(v27v1, v27v2, t, "-")
+	bs27, _ = testMarshalErr(&v27v1, h, t, "-")
+	v27v2 = nil
+	testUnmarshalErr(&v27v2, bs27, h, t, "-")
+	testDeepEqualErr(v27v1, v27v2, t, "-")
+
+	v28v1 := map[string]int{"": 0}
+	bs28, _ := testMarshalErr(v28v1, h, t, "-")
+	v28v2 := make(map[string]int)
+	testUnmarshalErr(v28v2, bs28, h, t, "-")
+	testDeepEqualErr(v28v1, v28v2, t, "-")
+	bs28, _ = testMarshalErr(&v28v1, h, t, "-")
+	v28v2 = nil
+	testUnmarshalErr(&v28v2, bs28, h, t, "-")
+	testDeepEqualErr(v28v1, v28v2, t, "-")
+
+	v29v1 := map[string]int8{"": 0}
+	bs29, _ := testMarshalErr(v29v1, h, t, "-")
+	v29v2 := make(map[string]int8)
+	testUnmarshalErr(v29v2, bs29, h, t, "-")
+	testDeepEqualErr(v29v1, v29v2, t, "-")
+	bs29, _ = testMarshalErr(&v29v1, h, t, "-")
+	v29v2 = nil
+	testUnmarshalErr(&v29v2, bs29, h, t, "-")
+	testDeepEqualErr(v29v1, v29v2, t, "-")
+
+	v30v1 := map[string]int16{"": 0}
+	bs30, _ := testMarshalErr(v30v1, h, t, "-")
+	v30v2 := make(map[string]int16)
+	testUnmarshalErr(v30v2, bs30, h, t, "-")
+	testDeepEqualErr(v30v1, v30v2, t, "-")
+	bs30, _ = testMarshalErr(&v30v1, h, t, "-")
+	v30v2 = nil
+	testUnmarshalErr(&v30v2, bs30, h, t, "-")
+	testDeepEqualErr(v30v1, v30v2, t, "-")
+
+	v31v1 := map[string]int32{"": 0}
+	bs31, _ := testMarshalErr(v31v1, h, t, "-")
+	v31v2 := make(map[string]int32)
+	testUnmarshalErr(v31v2, bs31, h, t, "-")
+	testDeepEqualErr(v31v1, v31v2, t, "-")
+	bs31, _ = testMarshalErr(&v31v1, h, t, "-")
+	v31v2 = nil
+	testUnmarshalErr(&v31v2, bs31, h, t, "-")
+	testDeepEqualErr(v31v1, v31v2, t, "-")
+
+	v32v1 := map[string]int64{"": 0}
+	bs32, _ := testMarshalErr(v32v1, h, t, "-")
+	v32v2 := make(map[string]int64)
+	testUnmarshalErr(v32v2, bs32, h, t, "-")
+	testDeepEqualErr(v32v1, v32v2, t, "-")
+	bs32, _ = testMarshalErr(&v32v1, h, t, "-")
+	v32v2 = nil
+	testUnmarshalErr(&v32v2, bs32, h, t, "-")
+	testDeepEqualErr(v32v1, v32v2, t, "-")
+
+	v33v1 := map[string]float32{"": 0}
+	bs33, _ := testMarshalErr(v33v1, h, t, "-")
+	v33v2 := make(map[string]float32)
+	testUnmarshalErr(v33v2, bs33, h, t, "-")
+	testDeepEqualErr(v33v1, v33v2, t, "-")
+	bs33, _ = testMarshalErr(&v33v1, h, t, "-")
+	v33v2 = nil
+	testUnmarshalErr(&v33v2, bs33, h, t, "-")
+	testDeepEqualErr(v33v1, v33v2, t, "-")
+
+	v34v1 := map[string]float64{"": 0}
+	bs34, _ := testMarshalErr(v34v1, h, t, "-")
+	v34v2 := make(map[string]float64)
+	testUnmarshalErr(v34v2, bs34, h, t, "-")
+	testDeepEqualErr(v34v1, v34v2, t, "-")
+	bs34, _ = testMarshalErr(&v34v1, h, t, "-")
+	v34v2 = nil
+	testUnmarshalErr(&v34v2, bs34, h, t, "-")
+	testDeepEqualErr(v34v1, v34v2, t, "-")
+
+	v35v1 := map[string]bool{"": false}
+	bs35, _ := testMarshalErr(v35v1, h, t, "-")
+	v35v2 := make(map[string]bool)
+	testUnmarshalErr(v35v2, bs35, h, t, "-")
+	testDeepEqualErr(v35v1, v35v2, t, "-")
+	bs35, _ = testMarshalErr(&v35v1, h, t, "-")
+	v35v2 = nil
+	testUnmarshalErr(&v35v2, bs35, h, t, "-")
+	testDeepEqualErr(v35v1, v35v2, t, "-")
+
+	v38v1 := map[float32]interface{}{0: nil}
+	bs38, _ := testMarshalErr(v38v1, h, t, "-")
+	v38v2 := make(map[float32]interface{})
+	testUnmarshalErr(v38v2, bs38, h, t, "-")
+	testDeepEqualErr(v38v1, v38v2, t, "-")
+	bs38, _ = testMarshalErr(&v38v1, h, t, "-")
+	v38v2 = nil
+	testUnmarshalErr(&v38v2, bs38, h, t, "-")
+	testDeepEqualErr(v38v1, v38v2, t, "-")
+
+	v39v1 := map[float32]string{0: ""}
+	bs39, _ := testMarshalErr(v39v1, h, t, "-")
+	v39v2 := make(map[float32]string)
+	testUnmarshalErr(v39v2, bs39, h, t, "-")
+	testDeepEqualErr(v39v1, v39v2, t, "-")
+	bs39, _ = testMarshalErr(&v39v1, h, t, "-")
+	v39v2 = nil
+	testUnmarshalErr(&v39v2, bs39, h, t, "-")
+	testDeepEqualErr(v39v1, v39v2, t, "-")
+
+	v40v1 := map[float32]uint{0: 0}
+	bs40, _ := testMarshalErr(v40v1, h, t, "-")
+	v40v2 := make(map[float32]uint)
+	testUnmarshalErr(v40v2, bs40, h, t, "-")
+	testDeepEqualErr(v40v1, v40v2, t, "-")
+	bs40, _ = testMarshalErr(&v40v1, h, t, "-")
+	v40v2 = nil
+	testUnmarshalErr(&v40v2, bs40, h, t, "-")
+	testDeepEqualErr(v40v1, v40v2, t, "-")
+
+	v41v1 := map[float32]uint8{0: 0}
+	bs41, _ := testMarshalErr(v41v1, h, t, "-")
+	v41v2 := make(map[float32]uint8)
+	testUnmarshalErr(v41v2, bs41, h, t, "-")
+	testDeepEqualErr(v41v1, v41v2, t, "-")
+	bs41, _ = testMarshalErr(&v41v1, h, t, "-")
+	v41v2 = nil
+	testUnmarshalErr(&v41v2, bs41, h, t, "-")
+	testDeepEqualErr(v41v1, v41v2, t, "-")
+
+	v42v1 := map[float32]uint16{0: 0}
+	bs42, _ := testMarshalErr(v42v1, h, t, "-")
+	v42v2 := make(map[float32]uint16)
+	testUnmarshalErr(v42v2, bs42, h, t, "-")
+	testDeepEqualErr(v42v1, v42v2, t, "-")
+	bs42, _ = testMarshalErr(&v42v1, h, t, "-")
+	v42v2 = nil
+	testUnmarshalErr(&v42v2, bs42, h, t, "-")
+	testDeepEqualErr(v42v1, v42v2, t, "-")
+
+	v43v1 := map[float32]uint32{0: 0}
+	bs43, _ := testMarshalErr(v43v1, h, t, "-")
+	v43v2 := make(map[float32]uint32)
+	testUnmarshalErr(v43v2, bs43, h, t, "-")
+	testDeepEqualErr(v43v1, v43v2, t, "-")
+	bs43, _ = testMarshalErr(&v43v1, h, t, "-")
+	v43v2 = nil
+	testUnmarshalErr(&v43v2, bs43, h, t, "-")
+	testDeepEqualErr(v43v1, v43v2, t, "-")
+
+	v44v1 := map[float32]uint64{0: 0}
+	bs44, _ := testMarshalErr(v44v1, h, t, "-")
+	v44v2 := make(map[float32]uint64)
+	testUnmarshalErr(v44v2, bs44, h, t, "-")
+	testDeepEqualErr(v44v1, v44v2, t, "-")
+	bs44, _ = testMarshalErr(&v44v1, h, t, "-")
+	v44v2 = nil
+	testUnmarshalErr(&v44v2, bs44, h, t, "-")
+	testDeepEqualErr(v44v1, v44v2, t, "-")
+
+	v45v1 := map[float32]uintptr{0: 0}
+	bs45, _ := testMarshalErr(v45v1, h, t, "-")
+	v45v2 := make(map[float32]uintptr)
+	testUnmarshalErr(v45v2, bs45, h, t, "-")
+	testDeepEqualErr(v45v1, v45v2, t, "-")
+	bs45, _ = testMarshalErr(&v45v1, h, t, "-")
+	v45v2 = nil
+	testUnmarshalErr(&v45v2, bs45, h, t, "-")
+	testDeepEqualErr(v45v1, v45v2, t, "-")
+
+	v46v1 := map[float32]int{0: 0}
+	bs46, _ := testMarshalErr(v46v1, h, t, "-")
+	v46v2 := make(map[float32]int)
+	testUnmarshalErr(v46v2, bs46, h, t, "-")
+	testDeepEqualErr(v46v1, v46v2, t, "-")
+	bs46, _ = testMarshalErr(&v46v1, h, t, "-")
+	v46v2 = nil
+	testUnmarshalErr(&v46v2, bs46, h, t, "-")
+	testDeepEqualErr(v46v1, v46v2, t, "-")
+
+	v47v1 := map[float32]int8{0: 0}
+	bs47, _ := testMarshalErr(v47v1, h, t, "-")
+	v47v2 := make(map[float32]int8)
+	testUnmarshalErr(v47v2, bs47, h, t, "-")
+	testDeepEqualErr(v47v1, v47v2, t, "-")
+	bs47, _ = testMarshalErr(&v47v1, h, t, "-")
+	v47v2 = nil
+	testUnmarshalErr(&v47v2, bs47, h, t, "-")
+	testDeepEqualErr(v47v1, v47v2, t, "-")
+
+	v48v1 := map[float32]int16{0: 0}
+	bs48, _ := testMarshalErr(v48v1, h, t, "-")
+	v48v2 := make(map[float32]int16)
+	testUnmarshalErr(v48v2, bs48, h, t, "-")
+	testDeepEqualErr(v48v1, v48v2, t, "-")
+	bs48, _ = testMarshalErr(&v48v1, h, t, "-")
+	v48v2 = nil
+	testUnmarshalErr(&v48v2, bs48, h, t, "-")
+	testDeepEqualErr(v48v1, v48v2, t, "-")
+
+	v49v1 := map[float32]int32{0: 0}
+	bs49, _ := testMarshalErr(v49v1, h, t, "-")
+	v49v2 := make(map[float32]int32)
+	testUnmarshalErr(v49v2, bs49, h, t, "-")
+	testDeepEqualErr(v49v1, v49v2, t, "-")
+	bs49, _ = testMarshalErr(&v49v1, h, t, "-")
+	v49v2 = nil
+	testUnmarshalErr(&v49v2, bs49, h, t, "-")
+	testDeepEqualErr(v49v1, v49v2, t, "-")
+
+	v50v1 := map[float32]int64{0: 0}
+	bs50, _ := testMarshalErr(v50v1, h, t, "-")
+	v50v2 := make(map[float32]int64)
+	testUnmarshalErr(v50v2, bs50, h, t, "-")
+	testDeepEqualErr(v50v1, v50v2, t, "-")
+	bs50, _ = testMarshalErr(&v50v1, h, t, "-")
+	v50v2 = nil
+	testUnmarshalErr(&v50v2, bs50, h, t, "-")
+	testDeepEqualErr(v50v1, v50v2, t, "-")
+
+	v51v1 := map[float32]float32{0: 0}
+	bs51, _ := testMarshalErr(v51v1, h, t, "-")
+	v51v2 := make(map[float32]float32)
+	testUnmarshalErr(v51v2, bs51, h, t, "-")
+	testDeepEqualErr(v51v1, v51v2, t, "-")
+	bs51, _ = testMarshalErr(&v51v1, h, t, "-")
+	v51v2 = nil
+	testUnmarshalErr(&v51v2, bs51, h, t, "-")
+	testDeepEqualErr(v51v1, v51v2, t, "-")
+
+	v52v1 := map[float32]float64{0: 0}
+	bs52, _ := testMarshalErr(v52v1, h, t, "-")
+	v52v2 := make(map[float32]float64)
+	testUnmarshalErr(v52v2, bs52, h, t, "-")
+	testDeepEqualErr(v52v1, v52v2, t, "-")
+	bs52, _ = testMarshalErr(&v52v1, h, t, "-")
+	v52v2 = nil
+	testUnmarshalErr(&v52v2, bs52, h, t, "-")
+	testDeepEqualErr(v52v1, v52v2, t, "-")
+
+	v53v1 := map[float32]bool{0: false}
+	bs53, _ := testMarshalErr(v53v1, h, t, "-")
+	v53v2 := make(map[float32]bool)
+	testUnmarshalErr(v53v2, bs53, h, t, "-")
+	testDeepEqualErr(v53v1, v53v2, t, "-")
+	bs53, _ = testMarshalErr(&v53v1, h, t, "-")
+	v53v2 = nil
+	testUnmarshalErr(&v53v2, bs53, h, t, "-")
+	testDeepEqualErr(v53v1, v53v2, t, "-")
+
+	v56v1 := map[float64]interface{}{0: nil}
+	bs56, _ := testMarshalErr(v56v1, h, t, "-")
+	v56v2 := make(map[float64]interface{})
+	testUnmarshalErr(v56v2, bs56, h, t, "-")
+	testDeepEqualErr(v56v1, v56v2, t, "-")
+	bs56, _ = testMarshalErr(&v56v1, h, t, "-")
+	v56v2 = nil
+	testUnmarshalErr(&v56v2, bs56, h, t, "-")
+	testDeepEqualErr(v56v1, v56v2, t, "-")
+
+	v57v1 := map[float64]string{0: ""}
+	bs57, _ := testMarshalErr(v57v1, h, t, "-")
+	v57v2 := make(map[float64]string)
+	testUnmarshalErr(v57v2, bs57, h, t, "-")
+	testDeepEqualErr(v57v1, v57v2, t, "-")
+	bs57, _ = testMarshalErr(&v57v1, h, t, "-")
+	v57v2 = nil
+	testUnmarshalErr(&v57v2, bs57, h, t, "-")
+	testDeepEqualErr(v57v1, v57v2, t, "-")
+
+	v58v1 := map[float64]uint{0: 0}
+	bs58, _ := testMarshalErr(v58v1, h, t, "-")
+	v58v2 := make(map[float64]uint)
+	testUnmarshalErr(v58v2, bs58, h, t, "-")
+	testDeepEqualErr(v58v1, v58v2, t, "-")
+	bs58, _ = testMarshalErr(&v58v1, h, t, "-")
+	v58v2 = nil
+	testUnmarshalErr(&v58v2, bs58, h, t, "-")
+	testDeepEqualErr(v58v1, v58v2, t, "-")
+
+	v59v1 := map[float64]uint8{0: 0}
+	bs59, _ := testMarshalErr(v59v1, h, t, "-")
+	v59v2 := make(map[float64]uint8)
+	testUnmarshalErr(v59v2, bs59, h, t, "-")
+	testDeepEqualErr(v59v1, v59v2, t, "-")
+	bs59, _ = testMarshalErr(&v59v1, h, t, "-")
+	v59v2 = nil
+	testUnmarshalErr(&v59v2, bs59, h, t, "-")
+	testDeepEqualErr(v59v1, v59v2, t, "-")
+
+	v60v1 := map[float64]uint16{0: 0}
+	bs60, _ := testMarshalErr(v60v1, h, t, "-")
+	v60v2 := make(map[float64]uint16)
+	testUnmarshalErr(v60v2, bs60, h, t, "-")
+	testDeepEqualErr(v60v1, v60v2, t, "-")
+	bs60, _ = testMarshalErr(&v60v1, h, t, "-")
+	v60v2 = nil
+	testUnmarshalErr(&v60v2, bs60, h, t, "-")
+	testDeepEqualErr(v60v1, v60v2, t, "-")
+
+	v61v1 := map[float64]uint32{0: 0}
+	bs61, _ := testMarshalErr(v61v1, h, t, "-")
+	v61v2 := make(map[float64]uint32)
+	testUnmarshalErr(v61v2, bs61, h, t, "-")
+	testDeepEqualErr(v61v1, v61v2, t, "-")
+	bs61, _ = testMarshalErr(&v61v1, h, t, "-")
+	v61v2 = nil
+	testUnmarshalErr(&v61v2, bs61, h, t, "-")
+	testDeepEqualErr(v61v1, v61v2, t, "-")
+
+	v62v1 := map[float64]uint64{0: 0}
+	bs62, _ := testMarshalErr(v62v1, h, t, "-")
+	v62v2 := make(map[float64]uint64)
+	testUnmarshalErr(v62v2, bs62, h, t, "-")
+	testDeepEqualErr(v62v1, v62v2, t, "-")
+	bs62, _ = testMarshalErr(&v62v1, h, t, "-")
+	v62v2 = nil
+	testUnmarshalErr(&v62v2, bs62, h, t, "-")
+	testDeepEqualErr(v62v1, v62v2, t, "-")
+
+	v63v1 := map[float64]uintptr{0: 0}
+	bs63, _ := testMarshalErr(v63v1, h, t, "-")
+	v63v2 := make(map[float64]uintptr)
+	testUnmarshalErr(v63v2, bs63, h, t, "-")
+	testDeepEqualErr(v63v1, v63v2, t, "-")
+	bs63, _ = testMarshalErr(&v63v1, h, t, "-")
+	v63v2 = nil
+	testUnmarshalErr(&v63v2, bs63, h, t, "-")
+	testDeepEqualErr(v63v1, v63v2, t, "-")
+
+	v64v1 := map[float64]int{0: 0}
+	bs64, _ := testMarshalErr(v64v1, h, t, "-")
+	v64v2 := make(map[float64]int)
+	testUnmarshalErr(v64v2, bs64, h, t, "-")
+	testDeepEqualErr(v64v1, v64v2, t, "-")
+	bs64, _ = testMarshalErr(&v64v1, h, t, "-")
+	v64v2 = nil
+	testUnmarshalErr(&v64v2, bs64, h, t, "-")
+	testDeepEqualErr(v64v1, v64v2, t, "-")
+
+	v65v1 := map[float64]int8{0: 0}
+	bs65, _ := testMarshalErr(v65v1, h, t, "-")
+	v65v2 := make(map[float64]int8)
+	testUnmarshalErr(v65v2, bs65, h, t, "-")
+	testDeepEqualErr(v65v1, v65v2, t, "-")
+	bs65, _ = testMarshalErr(&v65v1, h, t, "-")
+	v65v2 = nil
+	testUnmarshalErr(&v65v2, bs65, h, t, "-")
+	testDeepEqualErr(v65v1, v65v2, t, "-")
+
+	v66v1 := map[float64]int16{0: 0}
+	bs66, _ := testMarshalErr(v66v1, h, t, "-")
+	v66v2 := make(map[float64]int16)
+	testUnmarshalErr(v66v2, bs66, h, t, "-")
+	testDeepEqualErr(v66v1, v66v2, t, "-")
+	bs66, _ = testMarshalErr(&v66v1, h, t, "-")
+	v66v2 = nil
+	testUnmarshalErr(&v66v2, bs66, h, t, "-")
+	testDeepEqualErr(v66v1, v66v2, t, "-")
+
+	v67v1 := map[float64]int32{0: 0}
+	bs67, _ := testMarshalErr(v67v1, h, t, "-")
+	v67v2 := make(map[float64]int32)
+	testUnmarshalErr(v67v2, bs67, h, t, "-")
+	testDeepEqualErr(v67v1, v67v2, t, "-")
+	bs67, _ = testMarshalErr(&v67v1, h, t, "-")
+	v67v2 = nil
+	testUnmarshalErr(&v67v2, bs67, h, t, "-")
+	testDeepEqualErr(v67v1, v67v2, t, "-")
+
+	v68v1 := map[float64]int64{0: 0}
+	bs68, _ := testMarshalErr(v68v1, h, t, "-")
+	v68v2 := make(map[float64]int64)
+	testUnmarshalErr(v68v2, bs68, h, t, "-")
+	testDeepEqualErr(v68v1, v68v2, t, "-")
+	bs68, _ = testMarshalErr(&v68v1, h, t, "-")
+	v68v2 = nil
+	testUnmarshalErr(&v68v2, bs68, h, t, "-")
+	testDeepEqualErr(v68v1, v68v2, t, "-")
+
+	v69v1 := map[float64]float32{0: 0}
+	bs69, _ := testMarshalErr(v69v1, h, t, "-")
+	v69v2 := make(map[float64]float32)
+	testUnmarshalErr(v69v2, bs69, h, t, "-")
+	testDeepEqualErr(v69v1, v69v2, t, "-")
+	bs69, _ = testMarshalErr(&v69v1, h, t, "-")
+	v69v2 = nil
+	testUnmarshalErr(&v69v2, bs69, h, t, "-")
+	testDeepEqualErr(v69v1, v69v2, t, "-")
+
+	v70v1 := map[float64]float64{0: 0}
+	bs70, _ := testMarshalErr(v70v1, h, t, "-")
+	v70v2 := make(map[float64]float64)
+	testUnmarshalErr(v70v2, bs70, h, t, "-")
+	testDeepEqualErr(v70v1, v70v2, t, "-")
+	bs70, _ = testMarshalErr(&v70v1, h, t, "-")
+	v70v2 = nil
+	testUnmarshalErr(&v70v2, bs70, h, t, "-")
+	testDeepEqualErr(v70v1, v70v2, t, "-")
+
+	v71v1 := map[float64]bool{0: false}
+	bs71, _ := testMarshalErr(v71v1, h, t, "-")
+	v71v2 := make(map[float64]bool)
+	testUnmarshalErr(v71v2, bs71, h, t, "-")
+	testDeepEqualErr(v71v1, v71v2, t, "-")
+	bs71, _ = testMarshalErr(&v71v1, h, t, "-")
+	v71v2 = nil
+	testUnmarshalErr(&v71v2, bs71, h, t, "-")
+	testDeepEqualErr(v71v1, v71v2, t, "-")
+
+	v74v1 := map[uint]interface{}{0: nil}
+	bs74, _ := testMarshalErr(v74v1, h, t, "-")
+	v74v2 := make(map[uint]interface{})
+	testUnmarshalErr(v74v2, bs74, h, t, "-")
+	testDeepEqualErr(v74v1, v74v2, t, "-")
+	bs74, _ = testMarshalErr(&v74v1, h, t, "-")
+	v74v2 = nil
+	testUnmarshalErr(&v74v2, bs74, h, t, "-")
+	testDeepEqualErr(v74v1, v74v2, t, "-")
+
+	v75v1 := map[uint]string{0: ""}
+	bs75, _ := testMarshalErr(v75v1, h, t, "-")
+	v75v2 := make(map[uint]string)
+	testUnmarshalErr(v75v2, bs75, h, t, "-")
+	testDeepEqualErr(v75v1, v75v2, t, "-")
+	bs75, _ = testMarshalErr(&v75v1, h, t, "-")
+	v75v2 = nil
+	testUnmarshalErr(&v75v2, bs75, h, t, "-")
+	testDeepEqualErr(v75v1, v75v2, t, "-")
+
+	v76v1 := map[uint]uint{0: 0}
+	bs76, _ := testMarshalErr(v76v1, h, t, "-")
+	v76v2 := make(map[uint]uint)
+	testUnmarshalErr(v76v2, bs76, h, t, "-")
+	testDeepEqualErr(v76v1, v76v2, t, "-")
+	bs76, _ = testMarshalErr(&v76v1, h, t, "-")
+	v76v2 = nil
+	testUnmarshalErr(&v76v2, bs76, h, t, "-")
+	testDeepEqualErr(v76v1, v76v2, t, "-")
+
+	v77v1 := map[uint]uint8{0: 0}
+	bs77, _ := testMarshalErr(v77v1, h, t, "-")
+	v77v2 := make(map[uint]uint8)
+	testUnmarshalErr(v77v2, bs77, h, t, "-")
+	testDeepEqualErr(v77v1, v77v2, t, "-")
+	bs77, _ = testMarshalErr(&v77v1, h, t, "-")
+	v77v2 = nil
+	testUnmarshalErr(&v77v2, bs77, h, t, "-")
+	testDeepEqualErr(v77v1, v77v2, t, "-")
+
+	v78v1 := map[uint]uint16{0: 0}
+	bs78, _ := testMarshalErr(v78v1, h, t, "-")
+	v78v2 := make(map[uint]uint16)
+	testUnmarshalErr(v78v2, bs78, h, t, "-")
+	testDeepEqualErr(v78v1, v78v2, t, "-")
+	bs78, _ = testMarshalErr(&v78v1, h, t, "-")
+	v78v2 = nil
+	testUnmarshalErr(&v78v2, bs78, h, t, "-")
+	testDeepEqualErr(v78v1, v78v2, t, "-")
+
+	v79v1 := map[uint]uint32{0: 0}
+	bs79, _ := testMarshalErr(v79v1, h, t, "-")
+	v79v2 := make(map[uint]uint32)
+	testUnmarshalErr(v79v2, bs79, h, t, "-")
+	testDeepEqualErr(v79v1, v79v2, t, "-")
+	bs79, _ = testMarshalErr(&v79v1, h, t, "-")
+	v79v2 = nil
+	testUnmarshalErr(&v79v2, bs79, h, t, "-")
+	testDeepEqualErr(v79v1, v79v2, t, "-")
+
+	v80v1 := map[uint]uint64{0: 0}
+	bs80, _ := testMarshalErr(v80v1, h, t, "-")
+	v80v2 := make(map[uint]uint64)
+	testUnmarshalErr(v80v2, bs80, h, t, "-")
+	testDeepEqualErr(v80v1, v80v2, t, "-")
+	bs80, _ = testMarshalErr(&v80v1, h, t, "-")
+	v80v2 = nil
+	testUnmarshalErr(&v80v2, bs80, h, t, "-")
+	testDeepEqualErr(v80v1, v80v2, t, "-")
+
+	v81v1 := map[uint]uintptr{0: 0}
+	bs81, _ := testMarshalErr(v81v1, h, t, "-")
+	v81v2 := make(map[uint]uintptr)
+	testUnmarshalErr(v81v2, bs81, h, t, "-")
+	testDeepEqualErr(v81v1, v81v2, t, "-")
+	bs81, _ = testMarshalErr(&v81v1, h, t, "-")
+	v81v2 = nil
+	testUnmarshalErr(&v81v2, bs81, h, t, "-")
+	testDeepEqualErr(v81v1, v81v2, t, "-")
+
+	v82v1 := map[uint]int{0: 0}
+	bs82, _ := testMarshalErr(v82v1, h, t, "-")
+	v82v2 := make(map[uint]int)
+	testUnmarshalErr(v82v2, bs82, h, t, "-")
+	testDeepEqualErr(v82v1, v82v2, t, "-")
+	bs82, _ = testMarshalErr(&v82v1, h, t, "-")
+	v82v2 = nil
+	testUnmarshalErr(&v82v2, bs82, h, t, "-")
+	testDeepEqualErr(v82v1, v82v2, t, "-")
+
+	v83v1 := map[uint]int8{0: 0}
+	bs83, _ := testMarshalErr(v83v1, h, t, "-")
+	v83v2 := make(map[uint]int8)
+	testUnmarshalErr(v83v2, bs83, h, t, "-")
+	testDeepEqualErr(v83v1, v83v2, t, "-")
+	bs83, _ = testMarshalErr(&v83v1, h, t, "-")
+	v83v2 = nil
+	testUnmarshalErr(&v83v2, bs83, h, t, "-")
+	testDeepEqualErr(v83v1, v83v2, t, "-")
+
+	v84v1 := map[uint]int16{0: 0}
+	bs84, _ := testMarshalErr(v84v1, h, t, "-")
+	v84v2 := make(map[uint]int16)
+	testUnmarshalErr(v84v2, bs84, h, t, "-")
+	testDeepEqualErr(v84v1, v84v2, t, "-")
+	bs84, _ = testMarshalErr(&v84v1, h, t, "-")
+	v84v2 = nil
+	testUnmarshalErr(&v84v2, bs84, h, t, "-")
+	testDeepEqualErr(v84v1, v84v2, t, "-")
+
+	v85v1 := map[uint]int32{0: 0}
+	bs85, _ := testMarshalErr(v85v1, h, t, "-")
+	v85v2 := make(map[uint]int32)
+	testUnmarshalErr(v85v2, bs85, h, t, "-")
+	testDeepEqualErr(v85v1, v85v2, t, "-")
+	bs85, _ = testMarshalErr(&v85v1, h, t, "-")
+	v85v2 = nil
+	testUnmarshalErr(&v85v2, bs85, h, t, "-")
+	testDeepEqualErr(v85v1, v85v2, t, "-")
+
+	v86v1 := map[uint]int64{0: 0}
+	bs86, _ := testMarshalErr(v86v1, h, t, "-")
+	v86v2 := make(map[uint]int64)
+	testUnmarshalErr(v86v2, bs86, h, t, "-")
+	testDeepEqualErr(v86v1, v86v2, t, "-")
+	bs86, _ = testMarshalErr(&v86v1, h, t, "-")
+	v86v2 = nil
+	testUnmarshalErr(&v86v2, bs86, h, t, "-")
+	testDeepEqualErr(v86v1, v86v2, t, "-")
+
+	v87v1 := map[uint]float32{0: 0}
+	bs87, _ := testMarshalErr(v87v1, h, t, "-")
+	v87v2 := make(map[uint]float32)
+	testUnmarshalErr(v87v2, bs87, h, t, "-")
+	testDeepEqualErr(v87v1, v87v2, t, "-")
+	bs87, _ = testMarshalErr(&v87v1, h, t, "-")
+	v87v2 = nil
+	testUnmarshalErr(&v87v2, bs87, h, t, "-")
+	testDeepEqualErr(v87v1, v87v2, t, "-")
+
+	v88v1 := map[uint]float64{0: 0}
+	bs88, _ := testMarshalErr(v88v1, h, t, "-")
+	v88v2 := make(map[uint]float64)
+	testUnmarshalErr(v88v2, bs88, h, t, "-")
+	testDeepEqualErr(v88v1, v88v2, t, "-")
+	bs88, _ = testMarshalErr(&v88v1, h, t, "-")
+	v88v2 = nil
+	testUnmarshalErr(&v88v2, bs88, h, t, "-")
+	testDeepEqualErr(v88v1, v88v2, t, "-")
+
+	v89v1 := map[uint]bool{0: false}
+	bs89, _ := testMarshalErr(v89v1, h, t, "-")
+	v89v2 := make(map[uint]bool)
+	testUnmarshalErr(v89v2, bs89, h, t, "-")
+	testDeepEqualErr(v89v1, v89v2, t, "-")
+	bs89, _ = testMarshalErr(&v89v1, h, t, "-")
+	v89v2 = nil
+	testUnmarshalErr(&v89v2, bs89, h, t, "-")
+	testDeepEqualErr(v89v1, v89v2, t, "-")
+
+	v91v1 := map[uint8]interface{}{0: nil}
+	bs91, _ := testMarshalErr(v91v1, h, t, "-")
+	v91v2 := make(map[uint8]interface{})
+	testUnmarshalErr(v91v2, bs91, h, t, "-")
+	testDeepEqualErr(v91v1, v91v2, t, "-")
+	bs91, _ = testMarshalErr(&v91v1, h, t, "-")
+	v91v2 = nil
+	testUnmarshalErr(&v91v2, bs91, h, t, "-")
+	testDeepEqualErr(v91v1, v91v2, t, "-")
+
+	v92v1 := map[uint8]string{0: ""}
+	bs92, _ := testMarshalErr(v92v1, h, t, "-")
+	v92v2 := make(map[uint8]string)
+	testUnmarshalErr(v92v2, bs92, h, t, "-")
+	testDeepEqualErr(v92v1, v92v2, t, "-")
+	bs92, _ = testMarshalErr(&v92v1, h, t, "-")
+	v92v2 = nil
+	testUnmarshalErr(&v92v2, bs92, h, t, "-")
+	testDeepEqualErr(v92v1, v92v2, t, "-")
+
+	v93v1 := map[uint8]uint{0: 0}
+	bs93, _ := testMarshalErr(v93v1, h, t, "-")
+	v93v2 := make(map[uint8]uint)
+	testUnmarshalErr(v93v2, bs93, h, t, "-")
+	testDeepEqualErr(v93v1, v93v2, t, "-")
+	bs93, _ = testMarshalErr(&v93v1, h, t, "-")
+	v93v2 = nil
+	testUnmarshalErr(&v93v2, bs93, h, t, "-")
+	testDeepEqualErr(v93v1, v93v2, t, "-")
+
+	v94v1 := map[uint8]uint8{0: 0}
+	bs94, _ := testMarshalErr(v94v1, h, t, "-")
+	v94v2 := make(map[uint8]uint8)
+	testUnmarshalErr(v94v2, bs94, h, t, "-")
+	testDeepEqualErr(v94v1, v94v2, t, "-")
+	bs94, _ = testMarshalErr(&v94v1, h, t, "-")
+	v94v2 = nil
+	testUnmarshalErr(&v94v2, bs94, h, t, "-")
+	testDeepEqualErr(v94v1, v94v2, t, "-")
+
+	v95v1 := map[uint8]uint16{0: 0}
+	bs95, _ := testMarshalErr(v95v1, h, t, "-")
+	v95v2 := make(map[uint8]uint16)
+	testUnmarshalErr(v95v2, bs95, h, t, "-")
+	testDeepEqualErr(v95v1, v95v2, t, "-")
+	bs95, _ = testMarshalErr(&v95v1, h, t, "-")
+	v95v2 = nil
+	testUnmarshalErr(&v95v2, bs95, h, t, "-")
+	testDeepEqualErr(v95v1, v95v2, t, "-")
+
+	v96v1 := map[uint8]uint32{0: 0}
+	bs96, _ := testMarshalErr(v96v1, h, t, "-")
+	v96v2 := make(map[uint8]uint32)
+	testUnmarshalErr(v96v2, bs96, h, t, "-")
+	testDeepEqualErr(v96v1, v96v2, t, "-")
+	bs96, _ = testMarshalErr(&v96v1, h, t, "-")
+	v96v2 = nil
+	testUnmarshalErr(&v96v2, bs96, h, t, "-")
+	testDeepEqualErr(v96v1, v96v2, t, "-")
+
+	v97v1 := map[uint8]uint64{0: 0}
+	bs97, _ := testMarshalErr(v97v1, h, t, "-")
+	v97v2 := make(map[uint8]uint64)
+	testUnmarshalErr(v97v2, bs97, h, t, "-")
+	testDeepEqualErr(v97v1, v97v2, t, "-")
+	bs97, _ = testMarshalErr(&v97v1, h, t, "-")
+	v97v2 = nil
+	testUnmarshalErr(&v97v2, bs97, h, t, "-")
+	testDeepEqualErr(v97v1, v97v2, t, "-")
+
+	v98v1 := map[uint8]uintptr{0: 0}
+	bs98, _ := testMarshalErr(v98v1, h, t, "-")
+	v98v2 := make(map[uint8]uintptr)
+	testUnmarshalErr(v98v2, bs98, h, t, "-")
+	testDeepEqualErr(v98v1, v98v2, t, "-")
+	bs98, _ = testMarshalErr(&v98v1, h, t, "-")
+	v98v2 = nil
+	testUnmarshalErr(&v98v2, bs98, h, t, "-")
+	testDeepEqualErr(v98v1, v98v2, t, "-")
+
+	v99v1 := map[uint8]int{0: 0}
+	bs99, _ := testMarshalErr(v99v1, h, t, "-")
+	v99v2 := make(map[uint8]int)
+	testUnmarshalErr(v99v2, bs99, h, t, "-")
+	testDeepEqualErr(v99v1, v99v2, t, "-")
+	bs99, _ = testMarshalErr(&v99v1, h, t, "-")
+	v99v2 = nil
+	testUnmarshalErr(&v99v2, bs99, h, t, "-")
+	testDeepEqualErr(v99v1, v99v2, t, "-")
+
+	v100v1 := map[uint8]int8{0: 0}
+	bs100, _ := testMarshalErr(v100v1, h, t, "-")
+	v100v2 := make(map[uint8]int8)
+	testUnmarshalErr(v100v2, bs100, h, t, "-")
+	testDeepEqualErr(v100v1, v100v2, t, "-")
+	bs100, _ = testMarshalErr(&v100v1, h, t, "-")
+	v100v2 = nil
+	testUnmarshalErr(&v100v2, bs100, h, t, "-")
+	testDeepEqualErr(v100v1, v100v2, t, "-")
+
+	v101v1 := map[uint8]int16{0: 0}
+	bs101, _ := testMarshalErr(v101v1, h, t, "-")
+	v101v2 := make(map[uint8]int16)
+	testUnmarshalErr(v101v2, bs101, h, t, "-")
+	testDeepEqualErr(v101v1, v101v2, t, "-")
+	bs101, _ = testMarshalErr(&v101v1, h, t, "-")
+	v101v2 = nil
+	testUnmarshalErr(&v101v2, bs101, h, t, "-")
+	testDeepEqualErr(v101v1, v101v2, t, "-")
+
+	v102v1 := map[uint8]int32{0: 0}
+	bs102, _ := testMarshalErr(v102v1, h, t, "-")
+	v102v2 := make(map[uint8]int32)
+	testUnmarshalErr(v102v2, bs102, h, t, "-")
+	testDeepEqualErr(v102v1, v102v2, t, "-")
+	bs102, _ = testMarshalErr(&v102v1, h, t, "-")
+	v102v2 = nil
+	testUnmarshalErr(&v102v2, bs102, h, t, "-")
+	testDeepEqualErr(v102v1, v102v2, t, "-")
+
+	v103v1 := map[uint8]int64{0: 0}
+	bs103, _ := testMarshalErr(v103v1, h, t, "-")
+	v103v2 := make(map[uint8]int64)
+	testUnmarshalErr(v103v2, bs103, h, t, "-")
+	testDeepEqualErr(v103v1, v103v2, t, "-")
+	bs103, _ = testMarshalErr(&v103v1, h, t, "-")
+	v103v2 = nil
+	testUnmarshalErr(&v103v2, bs103, h, t, "-")
+	testDeepEqualErr(v103v1, v103v2, t, "-")
+
+	v104v1 := map[uint8]float32{0: 0}
+	bs104, _ := testMarshalErr(v104v1, h, t, "-")
+	v104v2 := make(map[uint8]float32)
+	testUnmarshalErr(v104v2, bs104, h, t, "-")
+	testDeepEqualErr(v104v1, v104v2, t, "-")
+	bs104, _ = testMarshalErr(&v104v1, h, t, "-")
+	v104v2 = nil
+	testUnmarshalErr(&v104v2, bs104, h, t, "-")
+	testDeepEqualErr(v104v1, v104v2, t, "-")
+
+	v105v1 := map[uint8]float64{0: 0}
+	bs105, _ := testMarshalErr(v105v1, h, t, "-")
+	v105v2 := make(map[uint8]float64)
+	testUnmarshalErr(v105v2, bs105, h, t, "-")
+	testDeepEqualErr(v105v1, v105v2, t, "-")
+	bs105, _ = testMarshalErr(&v105v1, h, t, "-")
+	v105v2 = nil
+	testUnmarshalErr(&v105v2, bs105, h, t, "-")
+	testDeepEqualErr(v105v1, v105v2, t, "-")
+
+	v106v1 := map[uint8]bool{0: false}
+	bs106, _ := testMarshalErr(v106v1, h, t, "-")
+	v106v2 := make(map[uint8]bool)
+	testUnmarshalErr(v106v2, bs106, h, t, "-")
+	testDeepEqualErr(v106v1, v106v2, t, "-")
+	bs106, _ = testMarshalErr(&v106v1, h, t, "-")
+	v106v2 = nil
+	testUnmarshalErr(&v106v2, bs106, h, t, "-")
+	testDeepEqualErr(v106v1, v106v2, t, "-")
+
+	v109v1 := map[uint16]interface{}{0: nil}
+	bs109, _ := testMarshalErr(v109v1, h, t, "-")
+	v109v2 := make(map[uint16]interface{})
+	testUnmarshalErr(v109v2, bs109, h, t, "-")
+	testDeepEqualErr(v109v1, v109v2, t, "-")
+	bs109, _ = testMarshalErr(&v109v1, h, t, "-")
+	v109v2 = nil
+	testUnmarshalErr(&v109v2, bs109, h, t, "-")
+	testDeepEqualErr(v109v1, v109v2, t, "-")
+
+	v110v1 := map[uint16]string{0: ""}
+	bs110, _ := testMarshalErr(v110v1, h, t, "-")
+	v110v2 := make(map[uint16]string)
+	testUnmarshalErr(v110v2, bs110, h, t, "-")
+	testDeepEqualErr(v110v1, v110v2, t, "-")
+	bs110, _ = testMarshalErr(&v110v1, h, t, "-")
+	v110v2 = nil
+	testUnmarshalErr(&v110v2, bs110, h, t, "-")
+	testDeepEqualErr(v110v1, v110v2, t, "-")
+
+	v111v1 := map[uint16]uint{0: 0}
+	bs111, _ := testMarshalErr(v111v1, h, t, "-")
+	v111v2 := make(map[uint16]uint)
+	testUnmarshalErr(v111v2, bs111, h, t, "-")
+	testDeepEqualErr(v111v1, v111v2, t, "-")
+	bs111, _ = testMarshalErr(&v111v1, h, t, "-")
+	v111v2 = nil
+	testUnmarshalErr(&v111v2, bs111, h, t, "-")
+	testDeepEqualErr(v111v1, v111v2, t, "-")
+
+	v112v1 := map[uint16]uint8{0: 0}
+	bs112, _ := testMarshalErr(v112v1, h, t, "-")
+	v112v2 := make(map[uint16]uint8)
+	testUnmarshalErr(v112v2, bs112, h, t, "-")
+	testDeepEqualErr(v112v1, v112v2, t, "-")
+	bs112, _ = testMarshalErr(&v112v1, h, t, "-")
+	v112v2 = nil
+	testUnmarshalErr(&v112v2, bs112, h, t, "-")
+	testDeepEqualErr(v112v1, v112v2, t, "-")
+
+	v113v1 := map[uint16]uint16{0: 0}
+	bs113, _ := testMarshalErr(v113v1, h, t, "-")
+	v113v2 := make(map[uint16]uint16)
+	testUnmarshalErr(v113v2, bs113, h, t, "-")
+	testDeepEqualErr(v113v1, v113v2, t, "-")
+	bs113, _ = testMarshalErr(&v113v1, h, t, "-")
+	v113v2 = nil
+	testUnmarshalErr(&v113v2, bs113, h, t, "-")
+	testDeepEqualErr(v113v1, v113v2, t, "-")
+
+	v114v1 := map[uint16]uint32{0: 0}
+	bs114, _ := testMarshalErr(v114v1, h, t, "-")
+	v114v2 := make(map[uint16]uint32)
+	testUnmarshalErr(v114v2, bs114, h, t, "-")
+	testDeepEqualErr(v114v1, v114v2, t, "-")
+	bs114, _ = testMarshalErr(&v114v1, h, t, "-")
+	v114v2 = nil
+	testUnmarshalErr(&v114v2, bs114, h, t, "-")
+	testDeepEqualErr(v114v1, v114v2, t, "-")
+
+	v115v1 := map[uint16]uint64{0: 0}
+	bs115, _ := testMarshalErr(v115v1, h, t, "-")
+	v115v2 := make(map[uint16]uint64)
+	testUnmarshalErr(v115v2, bs115, h, t, "-")
+	testDeepEqualErr(v115v1, v115v2, t, "-")
+	bs115, _ = testMarshalErr(&v115v1, h, t, "-")
+	v115v2 = nil
+	testUnmarshalErr(&v115v2, bs115, h, t, "-")
+	testDeepEqualErr(v115v1, v115v2, t, "-")
+
+	v116v1 := map[uint16]uintptr{0: 0}
+	bs116, _ := testMarshalErr(v116v1, h, t, "-")
+	v116v2 := make(map[uint16]uintptr)
+	testUnmarshalErr(v116v2, bs116, h, t, "-")
+	testDeepEqualErr(v116v1, v116v2, t, "-")
+	bs116, _ = testMarshalErr(&v116v1, h, t, "-")
+	v116v2 = nil
+	testUnmarshalErr(&v116v2, bs116, h, t, "-")
+	testDeepEqualErr(v116v1, v116v2, t, "-")
+
+	v117v1 := map[uint16]int{0: 0}
+	bs117, _ := testMarshalErr(v117v1, h, t, "-")
+	v117v2 := make(map[uint16]int)
+	testUnmarshalErr(v117v2, bs117, h, t, "-")
+	testDeepEqualErr(v117v1, v117v2, t, "-")
+	bs117, _ = testMarshalErr(&v117v1, h, t, "-")
+	v117v2 = nil
+	testUnmarshalErr(&v117v2, bs117, h, t, "-")
+	testDeepEqualErr(v117v1, v117v2, t, "-")
+
+	v118v1 := map[uint16]int8{0: 0}
+	bs118, _ := testMarshalErr(v118v1, h, t, "-")
+	v118v2 := make(map[uint16]int8)
+	testUnmarshalErr(v118v2, bs118, h, t, "-")
+	testDeepEqualErr(v118v1, v118v2, t, "-")
+	bs118, _ = testMarshalErr(&v118v1, h, t, "-")
+	v118v2 = nil
+	testUnmarshalErr(&v118v2, bs118, h, t, "-")
+	testDeepEqualErr(v118v1, v118v2, t, "-")
+
+	v119v1 := map[uint16]int16{0: 0}
+	bs119, _ := testMarshalErr(v119v1, h, t, "-")
+	v119v2 := make(map[uint16]int16)
+	testUnmarshalErr(v119v2, bs119, h, t, "-")
+	testDeepEqualErr(v119v1, v119v2, t, "-")
+	bs119, _ = testMarshalErr(&v119v1, h, t, "-")
+	v119v2 = nil
+	testUnmarshalErr(&v119v2, bs119, h, t, "-")
+	testDeepEqualErr(v119v1, v119v2, t, "-")
+
+	v120v1 := map[uint16]int32{0: 0}
+	bs120, _ := testMarshalErr(v120v1, h, t, "-")
+	v120v2 := make(map[uint16]int32)
+	testUnmarshalErr(v120v2, bs120, h, t, "-")
+	testDeepEqualErr(v120v1, v120v2, t, "-")
+	bs120, _ = testMarshalErr(&v120v1, h, t, "-")
+	v120v2 = nil
+	testUnmarshalErr(&v120v2, bs120, h, t, "-")
+	testDeepEqualErr(v120v1, v120v2, t, "-")
+
+	v121v1 := map[uint16]int64{0: 0}
+	bs121, _ := testMarshalErr(v121v1, h, t, "-")
+	v121v2 := make(map[uint16]int64)
+	testUnmarshalErr(v121v2, bs121, h, t, "-")
+	testDeepEqualErr(v121v1, v121v2, t, "-")
+	bs121, _ = testMarshalErr(&v121v1, h, t, "-")
+	v121v2 = nil
+	testUnmarshalErr(&v121v2, bs121, h, t, "-")
+	testDeepEqualErr(v121v1, v121v2, t, "-")
+
+	v122v1 := map[uint16]float32{0: 0}
+	bs122, _ := testMarshalErr(v122v1, h, t, "-")
+	v122v2 := make(map[uint16]float32)
+	testUnmarshalErr(v122v2, bs122, h, t, "-")
+	testDeepEqualErr(v122v1, v122v2, t, "-")
+	bs122, _ = testMarshalErr(&v122v1, h, t, "-")
+	v122v2 = nil
+	testUnmarshalErr(&v122v2, bs122, h, t, "-")
+	testDeepEqualErr(v122v1, v122v2, t, "-")
+
+	v123v1 := map[uint16]float64{0: 0}
+	bs123, _ := testMarshalErr(v123v1, h, t, "-")
+	v123v2 := make(map[uint16]float64)
+	testUnmarshalErr(v123v2, bs123, h, t, "-")
+	testDeepEqualErr(v123v1, v123v2, t, "-")
+	bs123, _ = testMarshalErr(&v123v1, h, t, "-")
+	v123v2 = nil
+	testUnmarshalErr(&v123v2, bs123, h, t, "-")
+	testDeepEqualErr(v123v1, v123v2, t, "-")
+
+	v124v1 := map[uint16]bool{0: false}
+	bs124, _ := testMarshalErr(v124v1, h, t, "-")
+	v124v2 := make(map[uint16]bool)
+	testUnmarshalErr(v124v2, bs124, h, t, "-")
+	testDeepEqualErr(v124v1, v124v2, t, "-")
+	bs124, _ = testMarshalErr(&v124v1, h, t, "-")
+	v124v2 = nil
+	testUnmarshalErr(&v124v2, bs124, h, t, "-")
+	testDeepEqualErr(v124v1, v124v2, t, "-")
+
+	v127v1 := map[uint32]interface{}{0: nil}
+	bs127, _ := testMarshalErr(v127v1, h, t, "-")
+	v127v2 := make(map[uint32]interface{})
+	testUnmarshalErr(v127v2, bs127, h, t, "-")
+	testDeepEqualErr(v127v1, v127v2, t, "-")
+	bs127, _ = testMarshalErr(&v127v1, h, t, "-")
+	v127v2 = nil
+	testUnmarshalErr(&v127v2, bs127, h, t, "-")
+	testDeepEqualErr(v127v1, v127v2, t, "-")
+
+	v128v1 := map[uint32]string{0: ""}
+	bs128, _ := testMarshalErr(v128v1, h, t, "-")
+	v128v2 := make(map[uint32]string)
+	testUnmarshalErr(v128v2, bs128, h, t, "-")
+	testDeepEqualErr(v128v1, v128v2, t, "-")
+	bs128, _ = testMarshalErr(&v128v1, h, t, "-")
+	v128v2 = nil
+	testUnmarshalErr(&v128v2, bs128, h, t, "-")
+	testDeepEqualErr(v128v1, v128v2, t, "-")
+
+	v129v1 := map[uint32]uint{0: 0}
+	bs129, _ := testMarshalErr(v129v1, h, t, "-")
+	v129v2 := make(map[uint32]uint)
+	testUnmarshalErr(v129v2, bs129, h, t, "-")
+	testDeepEqualErr(v129v1, v129v2, t, "-")
+	bs129, _ = testMarshalErr(&v129v1, h, t, "-")
+	v129v2 = nil
+	testUnmarshalErr(&v129v2, bs129, h, t, "-")
+	testDeepEqualErr(v129v1, v129v2, t, "-")
+
+	v130v1 := map[uint32]uint8{0: 0}
+	bs130, _ := testMarshalErr(v130v1, h, t, "-")
+	v130v2 := make(map[uint32]uint8)
+	testUnmarshalErr(v130v2, bs130, h, t, "-")
+	testDeepEqualErr(v130v1, v130v2, t, "-")
+	bs130, _ = testMarshalErr(&v130v1, h, t, "-")
+	v130v2 = nil
+	testUnmarshalErr(&v130v2, bs130, h, t, "-")
+	testDeepEqualErr(v130v1, v130v2, t, "-")
+
+	v131v1 := map[uint32]uint16{0: 0}
+	bs131, _ := testMarshalErr(v131v1, h, t, "-")
+	v131v2 := make(map[uint32]uint16)
+	testUnmarshalErr(v131v2, bs131, h, t, "-")
+	testDeepEqualErr(v131v1, v131v2, t, "-")
+	bs131, _ = testMarshalErr(&v131v1, h, t, "-")
+	v131v2 = nil
+	testUnmarshalErr(&v131v2, bs131, h, t, "-")
+	testDeepEqualErr(v131v1, v131v2, t, "-")
+
+	v132v1 := map[uint32]uint32{0: 0}
+	bs132, _ := testMarshalErr(v132v1, h, t, "-")
+	v132v2 := make(map[uint32]uint32)
+	testUnmarshalErr(v132v2, bs132, h, t, "-")
+	testDeepEqualErr(v132v1, v132v2, t, "-")
+	bs132, _ = testMarshalErr(&v132v1, h, t, "-")
+	v132v2 = nil
+	testUnmarshalErr(&v132v2, bs132, h, t, "-")
+	testDeepEqualErr(v132v1, v132v2, t, "-")
+
+	v133v1 := map[uint32]uint64{0: 0}
+	bs133, _ := testMarshalErr(v133v1, h, t, "-")
+	v133v2 := make(map[uint32]uint64)
+	testUnmarshalErr(v133v2, bs133, h, t, "-")
+	testDeepEqualErr(v133v1, v133v2, t, "-")
+	bs133, _ = testMarshalErr(&v133v1, h, t, "-")
+	v133v2 = nil
+	testUnmarshalErr(&v133v2, bs133, h, t, "-")
+	testDeepEqualErr(v133v1, v133v2, t, "-")
+
+	v134v1 := map[uint32]uintptr{0: 0}
+	bs134, _ := testMarshalErr(v134v1, h, t, "-")
+	v134v2 := make(map[uint32]uintptr)
+	testUnmarshalErr(v134v2, bs134, h, t, "-")
+	testDeepEqualErr(v134v1, v134v2, t, "-")
+	bs134, _ = testMarshalErr(&v134v1, h, t, "-")
+	v134v2 = nil
+	testUnmarshalErr(&v134v2, bs134, h, t, "-")
+	testDeepEqualErr(v134v1, v134v2, t, "-")
+
+	v135v1 := map[uint32]int{0: 0}
+	bs135, _ := testMarshalErr(v135v1, h, t, "-")
+	v135v2 := make(map[uint32]int)
+	testUnmarshalErr(v135v2, bs135, h, t, "-")
+	testDeepEqualErr(v135v1, v135v2, t, "-")
+	bs135, _ = testMarshalErr(&v135v1, h, t, "-")
+	v135v2 = nil
+	testUnmarshalErr(&v135v2, bs135, h, t, "-")
+	testDeepEqualErr(v135v1, v135v2, t, "-")
+
+	v136v1 := map[uint32]int8{0: 0}
+	bs136, _ := testMarshalErr(v136v1, h, t, "-")
+	v136v2 := make(map[uint32]int8)
+	testUnmarshalErr(v136v2, bs136, h, t, "-")
+	testDeepEqualErr(v136v1, v136v2, t, "-")
+	bs136, _ = testMarshalErr(&v136v1, h, t, "-")
+	v136v2 = nil
+	testUnmarshalErr(&v136v2, bs136, h, t, "-")
+	testDeepEqualErr(v136v1, v136v2, t, "-")
+
+	v137v1 := map[uint32]int16{0: 0}
+	bs137, _ := testMarshalErr(v137v1, h, t, "-")
+	v137v2 := make(map[uint32]int16)
+	testUnmarshalErr(v137v2, bs137, h, t, "-")
+	testDeepEqualErr(v137v1, v137v2, t, "-")
+	bs137, _ = testMarshalErr(&v137v1, h, t, "-")
+	v137v2 = nil
+	testUnmarshalErr(&v137v2, bs137, h, t, "-")
+	testDeepEqualErr(v137v1, v137v2, t, "-")
+
+	v138v1 := map[uint32]int32{0: 0}
+	bs138, _ := testMarshalErr(v138v1, h, t, "-")
+	v138v2 := make(map[uint32]int32)
+	testUnmarshalErr(v138v2, bs138, h, t, "-")
+	testDeepEqualErr(v138v1, v138v2, t, "-")
+	bs138, _ = testMarshalErr(&v138v1, h, t, "-")
+	v138v2 = nil
+	testUnmarshalErr(&v138v2, bs138, h, t, "-")
+	testDeepEqualErr(v138v1, v138v2, t, "-")
+
+	v139v1 := map[uint32]int64{0: 0}
+	bs139, _ := testMarshalErr(v139v1, h, t, "-")
+	v139v2 := make(map[uint32]int64)
+	testUnmarshalErr(v139v2, bs139, h, t, "-")
+	testDeepEqualErr(v139v1, v139v2, t, "-")
+	bs139, _ = testMarshalErr(&v139v1, h, t, "-")
+	v139v2 = nil
+	testUnmarshalErr(&v139v2, bs139, h, t, "-")
+	testDeepEqualErr(v139v1, v139v2, t, "-")
+
+	v140v1 := map[uint32]float32{0: 0}
+	bs140, _ := testMarshalErr(v140v1, h, t, "-")
+	v140v2 := make(map[uint32]float32)
+	testUnmarshalErr(v140v2, bs140, h, t, "-")
+	testDeepEqualErr(v140v1, v140v2, t, "-")
+	bs140, _ = testMarshalErr(&v140v1, h, t, "-")
+	v140v2 = nil
+	testUnmarshalErr(&v140v2, bs140, h, t, "-")
+	testDeepEqualErr(v140v1, v140v2, t, "-")
+
+	v141v1 := map[uint32]float64{0: 0}
+	bs141, _ := testMarshalErr(v141v1, h, t, "-")
+	v141v2 := make(map[uint32]float64)
+	testUnmarshalErr(v141v2, bs141, h, t, "-")
+	testDeepEqualErr(v141v1, v141v2, t, "-")
+	bs141, _ = testMarshalErr(&v141v1, h, t, "-")
+	v141v2 = nil
+	testUnmarshalErr(&v141v2, bs141, h, t, "-")
+	testDeepEqualErr(v141v1, v141v2, t, "-")
+
+	v142v1 := map[uint32]bool{0: false}
+	bs142, _ := testMarshalErr(v142v1, h, t, "-")
+	v142v2 := make(map[uint32]bool)
+	testUnmarshalErr(v142v2, bs142, h, t, "-")
+	testDeepEqualErr(v142v1, v142v2, t, "-")
+	bs142, _ = testMarshalErr(&v142v1, h, t, "-")
+	v142v2 = nil
+	testUnmarshalErr(&v142v2, bs142, h, t, "-")
+	testDeepEqualErr(v142v1, v142v2, t, "-")
+
+	v145v1 := map[uint64]interface{}{0: nil}
+	bs145, _ := testMarshalErr(v145v1, h, t, "-")
+	v145v2 := make(map[uint64]interface{})
+	testUnmarshalErr(v145v2, bs145, h, t, "-")
+	testDeepEqualErr(v145v1, v145v2, t, "-")
+	bs145, _ = testMarshalErr(&v145v1, h, t, "-")
+	v145v2 = nil
+	testUnmarshalErr(&v145v2, bs145, h, t, "-")
+	testDeepEqualErr(v145v1, v145v2, t, "-")
+
+	v146v1 := map[uint64]string{0: ""}
+	bs146, _ := testMarshalErr(v146v1, h, t, "-")
+	v146v2 := make(map[uint64]string)
+	testUnmarshalErr(v146v2, bs146, h, t, "-")
+	testDeepEqualErr(v146v1, v146v2, t, "-")
+	bs146, _ = testMarshalErr(&v146v1, h, t, "-")
+	v146v2 = nil
+	testUnmarshalErr(&v146v2, bs146, h, t, "-")
+	testDeepEqualErr(v146v1, v146v2, t, "-")
+
+	v147v1 := map[uint64]uint{0: 0}
+	bs147, _ := testMarshalErr(v147v1, h, t, "-")
+	v147v2 := make(map[uint64]uint)
+	testUnmarshalErr(v147v2, bs147, h, t, "-")
+	testDeepEqualErr(v147v1, v147v2, t, "-")
+	bs147, _ = testMarshalErr(&v147v1, h, t, "-")
+	v147v2 = nil
+	testUnmarshalErr(&v147v2, bs147, h, t, "-")
+	testDeepEqualErr(v147v1, v147v2, t, "-")
+
+	v148v1 := map[uint64]uint8{0: 0}
+	bs148, _ := testMarshalErr(v148v1, h, t, "-")
+	v148v2 := make(map[uint64]uint8)
+	testUnmarshalErr(v148v2, bs148, h, t, "-")
+	testDeepEqualErr(v148v1, v148v2, t, "-")
+	bs148, _ = testMarshalErr(&v148v1, h, t, "-")
+	v148v2 = nil
+	testUnmarshalErr(&v148v2, bs148, h, t, "-")
+	testDeepEqualErr(v148v1, v148v2, t, "-")
+
+	v149v1 := map[uint64]uint16{0: 0}
+	bs149, _ := testMarshalErr(v149v1, h, t, "-")
+	v149v2 := make(map[uint64]uint16)
+	testUnmarshalErr(v149v2, bs149, h, t, "-")
+	testDeepEqualErr(v149v1, v149v2, t, "-")
+	bs149, _ = testMarshalErr(&v149v1, h, t, "-")
+	v149v2 = nil
+	testUnmarshalErr(&v149v2, bs149, h, t, "-")
+	testDeepEqualErr(v149v1, v149v2, t, "-")
+
+	v150v1 := map[uint64]uint32{0: 0}
+	bs150, _ := testMarshalErr(v150v1, h, t, "-")
+	v150v2 := make(map[uint64]uint32)
+	testUnmarshalErr(v150v2, bs150, h, t, "-")
+	testDeepEqualErr(v150v1, v150v2, t, "-")
+	bs150, _ = testMarshalErr(&v150v1, h, t, "-")
+	v150v2 = nil
+	testUnmarshalErr(&v150v2, bs150, h, t, "-")
+	testDeepEqualErr(v150v1, v150v2, t, "-")
+
+	v151v1 := map[uint64]uint64{0: 0}
+	bs151, _ := testMarshalErr(v151v1, h, t, "-")
+	v151v2 := make(map[uint64]uint64)
+	testUnmarshalErr(v151v2, bs151, h, t, "-")
+	testDeepEqualErr(v151v1, v151v2, t, "-")
+	bs151, _ = testMarshalErr(&v151v1, h, t, "-")
+	v151v2 = nil
+	testUnmarshalErr(&v151v2, bs151, h, t, "-")
+	testDeepEqualErr(v151v1, v151v2, t, "-")
+
+	v152v1 := map[uint64]uintptr{0: 0}
+	bs152, _ := testMarshalErr(v152v1, h, t, "-")
+	v152v2 := make(map[uint64]uintptr)
+	testUnmarshalErr(v152v2, bs152, h, t, "-")
+	testDeepEqualErr(v152v1, v152v2, t, "-")
+	bs152, _ = testMarshalErr(&v152v1, h, t, "-")
+	v152v2 = nil
+	testUnmarshalErr(&v152v2, bs152, h, t, "-")
+	testDeepEqualErr(v152v1, v152v2, t, "-")
+
+	v153v1 := map[uint64]int{0: 0}
+	bs153, _ := testMarshalErr(v153v1, h, t, "-")
+	v153v2 := make(map[uint64]int)
+	testUnmarshalErr(v153v2, bs153, h, t, "-")
+	testDeepEqualErr(v153v1, v153v2, t, "-")
+	bs153, _ = testMarshalErr(&v153v1, h, t, "-")
+	v153v2 = nil
+	testUnmarshalErr(&v153v2, bs153, h, t, "-")
+	testDeepEqualErr(v153v1, v153v2, t, "-")
+
+	v154v1 := map[uint64]int8{0: 0}
+	bs154, _ := testMarshalErr(v154v1, h, t, "-")
+	v154v2 := make(map[uint64]int8)
+	testUnmarshalErr(v154v2, bs154, h, t, "-")
+	testDeepEqualErr(v154v1, v154v2, t, "-")
+	bs154, _ = testMarshalErr(&v154v1, h, t, "-")
+	v154v2 = nil
+	testUnmarshalErr(&v154v2, bs154, h, t, "-")
+	testDeepEqualErr(v154v1, v154v2, t, "-")
+
+	v155v1 := map[uint64]int16{0: 0}
+	bs155, _ := testMarshalErr(v155v1, h, t, "-")
+	v155v2 := make(map[uint64]int16)
+	testUnmarshalErr(v155v2, bs155, h, t, "-")
+	testDeepEqualErr(v155v1, v155v2, t, "-")
+	bs155, _ = testMarshalErr(&v155v1, h, t, "-")
+	v155v2 = nil
+	testUnmarshalErr(&v155v2, bs155, h, t, "-")
+	testDeepEqualErr(v155v1, v155v2, t, "-")
+
+	v156v1 := map[uint64]int32{0: 0}
+	bs156, _ := testMarshalErr(v156v1, h, t, "-")
+	v156v2 := make(map[uint64]int32)
+	testUnmarshalErr(v156v2, bs156, h, t, "-")
+	testDeepEqualErr(v156v1, v156v2, t, "-")
+	bs156, _ = testMarshalErr(&v156v1, h, t, "-")
+	v156v2 = nil
+	testUnmarshalErr(&v156v2, bs156, h, t, "-")
+	testDeepEqualErr(v156v1, v156v2, t, "-")
+
+	v157v1 := map[uint64]int64{0: 0}
+	bs157, _ := testMarshalErr(v157v1, h, t, "-")
+	v157v2 := make(map[uint64]int64)
+	testUnmarshalErr(v157v2, bs157, h, t, "-")
+	testDeepEqualErr(v157v1, v157v2, t, "-")
+	bs157, _ = testMarshalErr(&v157v1, h, t, "-")
+	v157v2 = nil
+	testUnmarshalErr(&v157v2, bs157, h, t, "-")
+	testDeepEqualErr(v157v1, v157v2, t, "-")
+
+	v158v1 := map[uint64]float32{0: 0}
+	bs158, _ := testMarshalErr(v158v1, h, t, "-")
+	v158v2 := make(map[uint64]float32)
+	testUnmarshalErr(v158v2, bs158, h, t, "-")
+	testDeepEqualErr(v158v1, v158v2, t, "-")
+	bs158, _ = testMarshalErr(&v158v1, h, t, "-")
+	v158v2 = nil
+	testUnmarshalErr(&v158v2, bs158, h, t, "-")
+	testDeepEqualErr(v158v1, v158v2, t, "-")
+
+	v159v1 := map[uint64]float64{0: 0}
+	bs159, _ := testMarshalErr(v159v1, h, t, "-")
+	v159v2 := make(map[uint64]float64)
+	testUnmarshalErr(v159v2, bs159, h, t, "-")
+	testDeepEqualErr(v159v1, v159v2, t, "-")
+	bs159, _ = testMarshalErr(&v159v1, h, t, "-")
+	v159v2 = nil
+	testUnmarshalErr(&v159v2, bs159, h, t, "-")
+	testDeepEqualErr(v159v1, v159v2, t, "-")
+
+	v160v1 := map[uint64]bool{0: false}
+	bs160, _ := testMarshalErr(v160v1, h, t, "-")
+	v160v2 := make(map[uint64]bool)
+	testUnmarshalErr(v160v2, bs160, h, t, "-")
+	testDeepEqualErr(v160v1, v160v2, t, "-")
+	bs160, _ = testMarshalErr(&v160v1, h, t, "-")
+	v160v2 = nil
+	testUnmarshalErr(&v160v2, bs160, h, t, "-")
+	testDeepEqualErr(v160v1, v160v2, t, "-")
+
+	v163v1 := map[uintptr]interface{}{0: nil}
+	bs163, _ := testMarshalErr(v163v1, h, t, "-")
+	v163v2 := make(map[uintptr]interface{})
+	testUnmarshalErr(v163v2, bs163, h, t, "-")
+	testDeepEqualErr(v163v1, v163v2, t, "-")
+	bs163, _ = testMarshalErr(&v163v1, h, t, "-")
+	v163v2 = nil
+	testUnmarshalErr(&v163v2, bs163, h, t, "-")
+	testDeepEqualErr(v163v1, v163v2, t, "-")
+
+	v164v1 := map[uintptr]string{0: ""}
+	bs164, _ := testMarshalErr(v164v1, h, t, "-")
+	v164v2 := make(map[uintptr]string)
+	testUnmarshalErr(v164v2, bs164, h, t, "-")
+	testDeepEqualErr(v164v1, v164v2, t, "-")
+	bs164, _ = testMarshalErr(&v164v1, h, t, "-")
+	v164v2 = nil
+	testUnmarshalErr(&v164v2, bs164, h, t, "-")
+	testDeepEqualErr(v164v1, v164v2, t, "-")
+
+	v165v1 := map[uintptr]uint{0: 0}
+	bs165, _ := testMarshalErr(v165v1, h, t, "-")
+	v165v2 := make(map[uintptr]uint)
+	testUnmarshalErr(v165v2, bs165, h, t, "-")
+	testDeepEqualErr(v165v1, v165v2, t, "-")
+	bs165, _ = testMarshalErr(&v165v1, h, t, "-")
+	v165v2 = nil
+	testUnmarshalErr(&v165v2, bs165, h, t, "-")
+	testDeepEqualErr(v165v1, v165v2, t, "-")
+
+	v166v1 := map[uintptr]uint8{0: 0}
+	bs166, _ := testMarshalErr(v166v1, h, t, "-")
+	v166v2 := make(map[uintptr]uint8)
+	testUnmarshalErr(v166v2, bs166, h, t, "-")
+	testDeepEqualErr(v166v1, v166v2, t, "-")
+	bs166, _ = testMarshalErr(&v166v1, h, t, "-")
+	v166v2 = nil
+	testUnmarshalErr(&v166v2, bs166, h, t, "-")
+	testDeepEqualErr(v166v1, v166v2, t, "-")
+
+	v167v1 := map[uintptr]uint16{0: 0}
+	bs167, _ := testMarshalErr(v167v1, h, t, "-")
+	v167v2 := make(map[uintptr]uint16)
+	testUnmarshalErr(v167v2, bs167, h, t, "-")
+	testDeepEqualErr(v167v1, v167v2, t, "-")
+	bs167, _ = testMarshalErr(&v167v1, h, t, "-")
+	v167v2 = nil
+	testUnmarshalErr(&v167v2, bs167, h, t, "-")
+	testDeepEqualErr(v167v1, v167v2, t, "-")
+
+	v168v1 := map[uintptr]uint32{0: 0}
+	bs168, _ := testMarshalErr(v168v1, h, t, "-")
+	v168v2 := make(map[uintptr]uint32)
+	testUnmarshalErr(v168v2, bs168, h, t, "-")
+	testDeepEqualErr(v168v1, v168v2, t, "-")
+	bs168, _ = testMarshalErr(&v168v1, h, t, "-")
+	v168v2 = nil
+	testUnmarshalErr(&v168v2, bs168, h, t, "-")
+	testDeepEqualErr(v168v1, v168v2, t, "-")
+
+	v169v1 := map[uintptr]uint64{0: 0}
+	bs169, _ := testMarshalErr(v169v1, h, t, "-")
+	v169v2 := make(map[uintptr]uint64)
+	testUnmarshalErr(v169v2, bs169, h, t, "-")
+	testDeepEqualErr(v169v1, v169v2, t, "-")
+	bs169, _ = testMarshalErr(&v169v1, h, t, "-")
+	v169v2 = nil
+	testUnmarshalErr(&v169v2, bs169, h, t, "-")
+	testDeepEqualErr(v169v1, v169v2, t, "-")
+
+	v170v1 := map[uintptr]uintptr{0: 0}
+	bs170, _ := testMarshalErr(v170v1, h, t, "-")
+	v170v2 := make(map[uintptr]uintptr)
+	testUnmarshalErr(v170v2, bs170, h, t, "-")
+	testDeepEqualErr(v170v1, v170v2, t, "-")
+	bs170, _ = testMarshalErr(&v170v1, h, t, "-")
+	v170v2 = nil
+	testUnmarshalErr(&v170v2, bs170, h, t, "-")
+	testDeepEqualErr(v170v1, v170v2, t, "-")
+
+	v171v1 := map[uintptr]int{0: 0}
+	bs171, _ := testMarshalErr(v171v1, h, t, "-")
+	v171v2 := make(map[uintptr]int)
+	testUnmarshalErr(v171v2, bs171, h, t, "-")
+	testDeepEqualErr(v171v1, v171v2, t, "-")
+	bs171, _ = testMarshalErr(&v171v1, h, t, "-")
+	v171v2 = nil
+	testUnmarshalErr(&v171v2, bs171, h, t, "-")
+	testDeepEqualErr(v171v1, v171v2, t, "-")
+
+	v172v1 := map[uintptr]int8{0: 0}
+	bs172, _ := testMarshalErr(v172v1, h, t, "-")
+	v172v2 := make(map[uintptr]int8)
+	testUnmarshalErr(v172v2, bs172, h, t, "-")
+	testDeepEqualErr(v172v1, v172v2, t, "-")
+	bs172, _ = testMarshalErr(&v172v1, h, t, "-")
+	v172v2 = nil
+	testUnmarshalErr(&v172v2, bs172, h, t, "-")
+	testDeepEqualErr(v172v1, v172v2, t, "-")
+
+	v173v1 := map[uintptr]int16{0: 0}
+	bs173, _ := testMarshalErr(v173v1, h, t, "-")
+	v173v2 := make(map[uintptr]int16)
+	testUnmarshalErr(v173v2, bs173, h, t, "-")
+	testDeepEqualErr(v173v1, v173v2, t, "-")
+	bs173, _ = testMarshalErr(&v173v1, h, t, "-")
+	v173v2 = nil
+	testUnmarshalErr(&v173v2, bs173, h, t, "-")
+	testDeepEqualErr(v173v1, v173v2, t, "-")
+
+	v174v1 := map[uintptr]int32{0: 0}
+	bs174, _ := testMarshalErr(v174v1, h, t, "-")
+	v174v2 := make(map[uintptr]int32)
+	testUnmarshalErr(v174v2, bs174, h, t, "-")
+	testDeepEqualErr(v174v1, v174v2, t, "-")
+	bs174, _ = testMarshalErr(&v174v1, h, t, "-")
+	v174v2 = nil
+	testUnmarshalErr(&v174v2, bs174, h, t, "-")
+	testDeepEqualErr(v174v1, v174v2, t, "-")
+
+	v175v1 := map[uintptr]int64{0: 0}
+	bs175, _ := testMarshalErr(v175v1, h, t, "-")
+	v175v2 := make(map[uintptr]int64)
+	testUnmarshalErr(v175v2, bs175, h, t, "-")
+	testDeepEqualErr(v175v1, v175v2, t, "-")
+	bs175, _ = testMarshalErr(&v175v1, h, t, "-")
+	v175v2 = nil
+	testUnmarshalErr(&v175v2, bs175, h, t, "-")
+	testDeepEqualErr(v175v1, v175v2, t, "-")
+
+	v176v1 := map[uintptr]float32{0: 0}
+	bs176, _ := testMarshalErr(v176v1, h, t, "-")
+	v176v2 := make(map[uintptr]float32)
+	testUnmarshalErr(v176v2, bs176, h, t, "-")
+	testDeepEqualErr(v176v1, v176v2, t, "-")
+	bs176, _ = testMarshalErr(&v176v1, h, t, "-")
+	v176v2 = nil
+	testUnmarshalErr(&v176v2, bs176, h, t, "-")
+	testDeepEqualErr(v176v1, v176v2, t, "-")
+
+	v177v1 := map[uintptr]float64{0: 0}
+	bs177, _ := testMarshalErr(v177v1, h, t, "-")
+	v177v2 := make(map[uintptr]float64)
+	testUnmarshalErr(v177v2, bs177, h, t, "-")
+	testDeepEqualErr(v177v1, v177v2, t, "-")
+	bs177, _ = testMarshalErr(&v177v1, h, t, "-")
+	v177v2 = nil
+	testUnmarshalErr(&v177v2, bs177, h, t, "-")
+	testDeepEqualErr(v177v1, v177v2, t, "-")
+
+	v178v1 := map[uintptr]bool{0: false}
+	bs178, _ := testMarshalErr(v178v1, h, t, "-")
+	v178v2 := make(map[uintptr]bool)
+	testUnmarshalErr(v178v2, bs178, h, t, "-")
+	testDeepEqualErr(v178v1, v178v2, t, "-")
+	bs178, _ = testMarshalErr(&v178v1, h, t, "-")
+	v178v2 = nil
+	testUnmarshalErr(&v178v2, bs178, h, t, "-")
+	testDeepEqualErr(v178v1, v178v2, t, "-")
+
+	v181v1 := map[int]interface{}{0: nil}
+	bs181, _ := testMarshalErr(v181v1, h, t, "-")
+	v181v2 := make(map[int]interface{})
+	testUnmarshalErr(v181v2, bs181, h, t, "-")
+	testDeepEqualErr(v181v1, v181v2, t, "-")
+	bs181, _ = testMarshalErr(&v181v1, h, t, "-")
+	v181v2 = nil
+	testUnmarshalErr(&v181v2, bs181, h, t, "-")
+	testDeepEqualErr(v181v1, v181v2, t, "-")
+
+	v182v1 := map[int]string{0: ""}
+	bs182, _ := testMarshalErr(v182v1, h, t, "-")
+	v182v2 := make(map[int]string)
+	testUnmarshalErr(v182v2, bs182, h, t, "-")
+	testDeepEqualErr(v182v1, v182v2, t, "-")
+	bs182, _ = testMarshalErr(&v182v1, h, t, "-")
+	v182v2 = nil
+	testUnmarshalErr(&v182v2, bs182, h, t, "-")
+	testDeepEqualErr(v182v1, v182v2, t, "-")
+
+	v183v1 := map[int]uint{0: 0}
+	bs183, _ := testMarshalErr(v183v1, h, t, "-")
+	v183v2 := make(map[int]uint)
+	testUnmarshalErr(v183v2, bs183, h, t, "-")
+	testDeepEqualErr(v183v1, v183v2, t, "-")
+	bs183, _ = testMarshalErr(&v183v1, h, t, "-")
+	v183v2 = nil
+	testUnmarshalErr(&v183v2, bs183, h, t, "-")
+	testDeepEqualErr(v183v1, v183v2, t, "-")
+
+	v184v1 := map[int]uint8{0: 0}
+	bs184, _ := testMarshalErr(v184v1, h, t, "-")
+	v184v2 := make(map[int]uint8)
+	testUnmarshalErr(v184v2, bs184, h, t, "-")
+	testDeepEqualErr(v184v1, v184v2, t, "-")
+	bs184, _ = testMarshalErr(&v184v1, h, t, "-")
+	v184v2 = nil
+	testUnmarshalErr(&v184v2, bs184, h, t, "-")
+	testDeepEqualErr(v184v1, v184v2, t, "-")
+
+	v185v1 := map[int]uint16{0: 0}
+	bs185, _ := testMarshalErr(v185v1, h, t, "-")
+	v185v2 := make(map[int]uint16)
+	testUnmarshalErr(v185v2, bs185, h, t, "-")
+	testDeepEqualErr(v185v1, v185v2, t, "-")
+	bs185, _ = testMarshalErr(&v185v1, h, t, "-")
+	v185v2 = nil
+	testUnmarshalErr(&v185v2, bs185, h, t, "-")
+	testDeepEqualErr(v185v1, v185v2, t, "-")
+
+	v186v1 := map[int]uint32{0: 0}
+	bs186, _ := testMarshalErr(v186v1, h, t, "-")
+	v186v2 := make(map[int]uint32)
+	testUnmarshalErr(v186v2, bs186, h, t, "-")
+	testDeepEqualErr(v186v1, v186v2, t, "-")
+	bs186, _ = testMarshalErr(&v186v1, h, t, "-")
+	v186v2 = nil
+	testUnmarshalErr(&v186v2, bs186, h, t, "-")
+	testDeepEqualErr(v186v1, v186v2, t, "-")
+
+	v187v1 := map[int]uint64{0: 0}
+	bs187, _ := testMarshalErr(v187v1, h, t, "-")
+	v187v2 := make(map[int]uint64)
+	testUnmarshalErr(v187v2, bs187, h, t, "-")
+	testDeepEqualErr(v187v1, v187v2, t, "-")
+	bs187, _ = testMarshalErr(&v187v1, h, t, "-")
+	v187v2 = nil
+	testUnmarshalErr(&v187v2, bs187, h, t, "-")
+	testDeepEqualErr(v187v1, v187v2, t, "-")
+
+	v188v1 := map[int]uintptr{0: 0}
+	bs188, _ := testMarshalErr(v188v1, h, t, "-")
+	v188v2 := make(map[int]uintptr)
+	testUnmarshalErr(v188v2, bs188, h, t, "-")
+	testDeepEqualErr(v188v1, v188v2, t, "-")
+	bs188, _ = testMarshalErr(&v188v1, h, t, "-")
+	v188v2 = nil
+	testUnmarshalErr(&v188v2, bs188, h, t, "-")
+	testDeepEqualErr(v188v1, v188v2, t, "-")
+
+	v189v1 := map[int]int{0: 0}
+	bs189, _ := testMarshalErr(v189v1, h, t, "-")
+	v189v2 := make(map[int]int)
+	testUnmarshalErr(v189v2, bs189, h, t, "-")
+	testDeepEqualErr(v189v1, v189v2, t, "-")
+	bs189, _ = testMarshalErr(&v189v1, h, t, "-")
+	v189v2 = nil
+	testUnmarshalErr(&v189v2, bs189, h, t, "-")
+	testDeepEqualErr(v189v1, v189v2, t, "-")
+
+	v190v1 := map[int]int8{0: 0}
+	bs190, _ := testMarshalErr(v190v1, h, t, "-")
+	v190v2 := make(map[int]int8)
+	testUnmarshalErr(v190v2, bs190, h, t, "-")
+	testDeepEqualErr(v190v1, v190v2, t, "-")
+	bs190, _ = testMarshalErr(&v190v1, h, t, "-")
+	v190v2 = nil
+	testUnmarshalErr(&v190v2, bs190, h, t, "-")
+	testDeepEqualErr(v190v1, v190v2, t, "-")
+
+	v191v1 := map[int]int16{0: 0}
+	bs191, _ := testMarshalErr(v191v1, h, t, "-")
+	v191v2 := make(map[int]int16)
+	testUnmarshalErr(v191v2, bs191, h, t, "-")
+	testDeepEqualErr(v191v1, v191v2, t, "-")
+	bs191, _ = testMarshalErr(&v191v1, h, t, "-")
+	v191v2 = nil
+	testUnmarshalErr(&v191v2, bs191, h, t, "-")
+	testDeepEqualErr(v191v1, v191v2, t, "-")
+
+	v192v1 := map[int]int32{0: 0}
+	bs192, _ := testMarshalErr(v192v1, h, t, "-")
+	v192v2 := make(map[int]int32)
+	testUnmarshalErr(v192v2, bs192, h, t, "-")
+	testDeepEqualErr(v192v1, v192v2, t, "-")
+	bs192, _ = testMarshalErr(&v192v1, h, t, "-")
+	v192v2 = nil
+	testUnmarshalErr(&v192v2, bs192, h, t, "-")
+	testDeepEqualErr(v192v1, v192v2, t, "-")
+
+	v193v1 := map[int]int64{0: 0}
+	bs193, _ := testMarshalErr(v193v1, h, t, "-")
+	v193v2 := make(map[int]int64)
+	testUnmarshalErr(v193v2, bs193, h, t, "-")
+	testDeepEqualErr(v193v1, v193v2, t, "-")
+	bs193, _ = testMarshalErr(&v193v1, h, t, "-")
+	v193v2 = nil
+	testUnmarshalErr(&v193v2, bs193, h, t, "-")
+	testDeepEqualErr(v193v1, v193v2, t, "-")
+
+	v194v1 := map[int]float32{0: 0}
+	bs194, _ := testMarshalErr(v194v1, h, t, "-")
+	v194v2 := make(map[int]float32)
+	testUnmarshalErr(v194v2, bs194, h, t, "-")
+	testDeepEqualErr(v194v1, v194v2, t, "-")
+	bs194, _ = testMarshalErr(&v194v1, h, t, "-")
+	v194v2 = nil
+	testUnmarshalErr(&v194v2, bs194, h, t, "-")
+	testDeepEqualErr(v194v1, v194v2, t, "-")
+
+	v195v1 := map[int]float64{0: 0}
+	bs195, _ := testMarshalErr(v195v1, h, t, "-")
+	v195v2 := make(map[int]float64)
+	testUnmarshalErr(v195v2, bs195, h, t, "-")
+	testDeepEqualErr(v195v1, v195v2, t, "-")
+	bs195, _ = testMarshalErr(&v195v1, h, t, "-")
+	v195v2 = nil
+	testUnmarshalErr(&v195v2, bs195, h, t, "-")
+	testDeepEqualErr(v195v1, v195v2, t, "-")
+
+	v196v1 := map[int]bool{0: false}
+	bs196, _ := testMarshalErr(v196v1, h, t, "-")
+	v196v2 := make(map[int]bool)
+	testUnmarshalErr(v196v2, bs196, h, t, "-")
+	testDeepEqualErr(v196v1, v196v2, t, "-")
+	bs196, _ = testMarshalErr(&v196v1, h, t, "-")
+	v196v2 = nil
+	testUnmarshalErr(&v196v2, bs196, h, t, "-")
+	testDeepEqualErr(v196v1, v196v2, t, "-")
+
+	v199v1 := map[int8]interface{}{0: nil}
+	bs199, _ := testMarshalErr(v199v1, h, t, "-")
+	v199v2 := make(map[int8]interface{})
+	testUnmarshalErr(v199v2, bs199, h, t, "-")
+	testDeepEqualErr(v199v1, v199v2, t, "-")
+	bs199, _ = testMarshalErr(&v199v1, h, t, "-")
+	v199v2 = nil
+	testUnmarshalErr(&v199v2, bs199, h, t, "-")
+	testDeepEqualErr(v199v1, v199v2, t, "-")
+
+	v200v1 := map[int8]string{0: ""}
+	bs200, _ := testMarshalErr(v200v1, h, t, "-")
+	v200v2 := make(map[int8]string)
+	testUnmarshalErr(v200v2, bs200, h, t, "-")
+	testDeepEqualErr(v200v1, v200v2, t, "-")
+	bs200, _ = testMarshalErr(&v200v1, h, t, "-")
+	v200v2 = nil
+	testUnmarshalErr(&v200v2, bs200, h, t, "-")
+	testDeepEqualErr(v200v1, v200v2, t, "-")
+
+	v201v1 := map[int8]uint{0: 0}
+	bs201, _ := testMarshalErr(v201v1, h, t, "-")
+	v201v2 := make(map[int8]uint)
+	testUnmarshalErr(v201v2, bs201, h, t, "-")
+	testDeepEqualErr(v201v1, v201v2, t, "-")
+	bs201, _ = testMarshalErr(&v201v1, h, t, "-")
+	v201v2 = nil
+	testUnmarshalErr(&v201v2, bs201, h, t, "-")
+	testDeepEqualErr(v201v1, v201v2, t, "-")
+
+	v202v1 := map[int8]uint8{0: 0}
+	bs202, _ := testMarshalErr(v202v1, h, t, "-")
+	v202v2 := make(map[int8]uint8)
+	testUnmarshalErr(v202v2, bs202, h, t, "-")
+	testDeepEqualErr(v202v1, v202v2, t, "-")
+	bs202, _ = testMarshalErr(&v202v1, h, t, "-")
+	v202v2 = nil
+	testUnmarshalErr(&v202v2, bs202, h, t, "-")
+	testDeepEqualErr(v202v1, v202v2, t, "-")
+
+	v203v1 := map[int8]uint16{0: 0}
+	bs203, _ := testMarshalErr(v203v1, h, t, "-")
+	v203v2 := make(map[int8]uint16)
+	testUnmarshalErr(v203v2, bs203, h, t, "-")
+	testDeepEqualErr(v203v1, v203v2, t, "-")
+	bs203, _ = testMarshalErr(&v203v1, h, t, "-")
+	v203v2 = nil
+	testUnmarshalErr(&v203v2, bs203, h, t, "-")
+	testDeepEqualErr(v203v1, v203v2, t, "-")
+
+	v204v1 := map[int8]uint32{0: 0}
+	bs204, _ := testMarshalErr(v204v1, h, t, "-")
+	v204v2 := make(map[int8]uint32)
+	testUnmarshalErr(v204v2, bs204, h, t, "-")
+	testDeepEqualErr(v204v1, v204v2, t, "-")
+	bs204, _ = testMarshalErr(&v204v1, h, t, "-")
+	v204v2 = nil
+	testUnmarshalErr(&v204v2, bs204, h, t, "-")
+	testDeepEqualErr(v204v1, v204v2, t, "-")
+
+	v205v1 := map[int8]uint64{0: 0}
+	bs205, _ := testMarshalErr(v205v1, h, t, "-")
+	v205v2 := make(map[int8]uint64)
+	testUnmarshalErr(v205v2, bs205, h, t, "-")
+	testDeepEqualErr(v205v1, v205v2, t, "-")
+	bs205, _ = testMarshalErr(&v205v1, h, t, "-")
+	v205v2 = nil
+	testUnmarshalErr(&v205v2, bs205, h, t, "-")
+	testDeepEqualErr(v205v1, v205v2, t, "-")
+
+	v206v1 := map[int8]uintptr{0: 0}
+	bs206, _ := testMarshalErr(v206v1, h, t, "-")
+	v206v2 := make(map[int8]uintptr)
+	testUnmarshalErr(v206v2, bs206, h, t, "-")
+	testDeepEqualErr(v206v1, v206v2, t, "-")
+	bs206, _ = testMarshalErr(&v206v1, h, t, "-")
+	v206v2 = nil
+	testUnmarshalErr(&v206v2, bs206, h, t, "-")
+	testDeepEqualErr(v206v1, v206v2, t, "-")
+
+	v207v1 := map[int8]int{0: 0}
+	bs207, _ := testMarshalErr(v207v1, h, t, "-")
+	v207v2 := make(map[int8]int)
+	testUnmarshalErr(v207v2, bs207, h, t, "-")
+	testDeepEqualErr(v207v1, v207v2, t, "-")
+	bs207, _ = testMarshalErr(&v207v1, h, t, "-")
+	v207v2 = nil
+	testUnmarshalErr(&v207v2, bs207, h, t, "-")
+	testDeepEqualErr(v207v1, v207v2, t, "-")
+
+	v208v1 := map[int8]int8{0: 0}
+	bs208, _ := testMarshalErr(v208v1, h, t, "-")
+	v208v2 := make(map[int8]int8)
+	testUnmarshalErr(v208v2, bs208, h, t, "-")
+	testDeepEqualErr(v208v1, v208v2, t, "-")
+	bs208, _ = testMarshalErr(&v208v1, h, t, "-")
+	v208v2 = nil
+	testUnmarshalErr(&v208v2, bs208, h, t, "-")
+	testDeepEqualErr(v208v1, v208v2, t, "-")
+
+	v209v1 := map[int8]int16{0: 0}
+	bs209, _ := testMarshalErr(v209v1, h, t, "-")
+	v209v2 := make(map[int8]int16)
+	testUnmarshalErr(v209v2, bs209, h, t, "-")
+	testDeepEqualErr(v209v1, v209v2, t, "-")
+	bs209, _ = testMarshalErr(&v209v1, h, t, "-")
+	v209v2 = nil
+	testUnmarshalErr(&v209v2, bs209, h, t, "-")
+	testDeepEqualErr(v209v1, v209v2, t, "-")
+
+	v210v1 := map[int8]int32{0: 0}
+	bs210, _ := testMarshalErr(v210v1, h, t, "-")
+	v210v2 := make(map[int8]int32)
+	testUnmarshalErr(v210v2, bs210, h, t, "-")
+	testDeepEqualErr(v210v1, v210v2, t, "-")
+	bs210, _ = testMarshalErr(&v210v1, h, t, "-")
+	v210v2 = nil
+	testUnmarshalErr(&v210v2, bs210, h, t, "-")
+	testDeepEqualErr(v210v1, v210v2, t, "-")
+
+	v211v1 := map[int8]int64{0: 0}
+	bs211, _ := testMarshalErr(v211v1, h, t, "-")
+	v211v2 := make(map[int8]int64)
+	testUnmarshalErr(v211v2, bs211, h, t, "-")
+	testDeepEqualErr(v211v1, v211v2, t, "-")
+	bs211, _ = testMarshalErr(&v211v1, h, t, "-")
+	v211v2 = nil
+	testUnmarshalErr(&v211v2, bs211, h, t, "-")
+	testDeepEqualErr(v211v1, v211v2, t, "-")
+
+	v212v1 := map[int8]float32{0: 0}
+	bs212, _ := testMarshalErr(v212v1, h, t, "-")
+	v212v2 := make(map[int8]float32)
+	testUnmarshalErr(v212v2, bs212, h, t, "-")
+	testDeepEqualErr(v212v1, v212v2, t, "-")
+	bs212, _ = testMarshalErr(&v212v1, h, t, "-")
+	v212v2 = nil
+	testUnmarshalErr(&v212v2, bs212, h, t, "-")
+	testDeepEqualErr(v212v1, v212v2, t, "-")
+
+	v213v1 := map[int8]float64{0: 0}
+	bs213, _ := testMarshalErr(v213v1, h, t, "-")
+	v213v2 := make(map[int8]float64)
+	testUnmarshalErr(v213v2, bs213, h, t, "-")
+	testDeepEqualErr(v213v1, v213v2, t, "-")
+	bs213, _ = testMarshalErr(&v213v1, h, t, "-")
+	v213v2 = nil
+	testUnmarshalErr(&v213v2, bs213, h, t, "-")
+	testDeepEqualErr(v213v1, v213v2, t, "-")
+
+	v214v1 := map[int8]bool{0: false}
+	bs214, _ := testMarshalErr(v214v1, h, t, "-")
+	v214v2 := make(map[int8]bool)
+	testUnmarshalErr(v214v2, bs214, h, t, "-")
+	testDeepEqualErr(v214v1, v214v2, t, "-")
+	bs214, _ = testMarshalErr(&v214v1, h, t, "-")
+	v214v2 = nil
+	testUnmarshalErr(&v214v2, bs214, h, t, "-")
+	testDeepEqualErr(v214v1, v214v2, t, "-")
+
+	v217v1 := map[int16]interface{}{0: nil}
+	bs217, _ := testMarshalErr(v217v1, h, t, "-")
+	v217v2 := make(map[int16]interface{})
+	testUnmarshalErr(v217v2, bs217, h, t, "-")
+	testDeepEqualErr(v217v1, v217v2, t, "-")
+	bs217, _ = testMarshalErr(&v217v1, h, t, "-")
+	v217v2 = nil
+	testUnmarshalErr(&v217v2, bs217, h, t, "-")
+	testDeepEqualErr(v217v1, v217v2, t, "-")
+
+	v218v1 := map[int16]string{0: ""}
+	bs218, _ := testMarshalErr(v218v1, h, t, "-")
+	v218v2 := make(map[int16]string)
+	testUnmarshalErr(v218v2, bs218, h, t, "-")
+	testDeepEqualErr(v218v1, v218v2, t, "-")
+	bs218, _ = testMarshalErr(&v218v1, h, t, "-")
+	v218v2 = nil
+	testUnmarshalErr(&v218v2, bs218, h, t, "-")
+	testDeepEqualErr(v218v1, v218v2, t, "-")
+
+	v219v1 := map[int16]uint{0: 0}
+	bs219, _ := testMarshalErr(v219v1, h, t, "-")
+	v219v2 := make(map[int16]uint)
+	testUnmarshalErr(v219v2, bs219, h, t, "-")
+	testDeepEqualErr(v219v1, v219v2, t, "-")
+	bs219, _ = testMarshalErr(&v219v1, h, t, "-")
+	v219v2 = nil
+	testUnmarshalErr(&v219v2, bs219, h, t, "-")
+	testDeepEqualErr(v219v1, v219v2, t, "-")
+
+	v220v1 := map[int16]uint8{0: 0}
+	bs220, _ := testMarshalErr(v220v1, h, t, "-")
+	v220v2 := make(map[int16]uint8)
+	testUnmarshalErr(v220v2, bs220, h, t, "-")
+	testDeepEqualErr(v220v1, v220v2, t, "-")
+	bs220, _ = testMarshalErr(&v220v1, h, t, "-")
+	v220v2 = nil
+	testUnmarshalErr(&v220v2, bs220, h, t, "-")
+	testDeepEqualErr(v220v1, v220v2, t, "-")
+
+	v221v1 := map[int16]uint16{0: 0}
+	bs221, _ := testMarshalErr(v221v1, h, t, "-")
+	v221v2 := make(map[int16]uint16)
+	testUnmarshalErr(v221v2, bs221, h, t, "-")
+	testDeepEqualErr(v221v1, v221v2, t, "-")
+	bs221, _ = testMarshalErr(&v221v1, h, t, "-")
+	v221v2 = nil
+	testUnmarshalErr(&v221v2, bs221, h, t, "-")
+	testDeepEqualErr(v221v1, v221v2, t, "-")
+
+	v222v1 := map[int16]uint32{0: 0}
+	bs222, _ := testMarshalErr(v222v1, h, t, "-")
+	v222v2 := make(map[int16]uint32)
+	testUnmarshalErr(v222v2, bs222, h, t, "-")
+	testDeepEqualErr(v222v1, v222v2, t, "-")
+	bs222, _ = testMarshalErr(&v222v1, h, t, "-")
+	v222v2 = nil
+	testUnmarshalErr(&v222v2, bs222, h, t, "-")
+	testDeepEqualErr(v222v1, v222v2, t, "-")
+
+	v223v1 := map[int16]uint64{0: 0}
+	bs223, _ := testMarshalErr(v223v1, h, t, "-")
+	v223v2 := make(map[int16]uint64)
+	testUnmarshalErr(v223v2, bs223, h, t, "-")
+	testDeepEqualErr(v223v1, v223v2, t, "-")
+	bs223, _ = testMarshalErr(&v223v1, h, t, "-")
+	v223v2 = nil
+	testUnmarshalErr(&v223v2, bs223, h, t, "-")
+	testDeepEqualErr(v223v1, v223v2, t, "-")
+
+	v224v1 := map[int16]uintptr{0: 0}
+	bs224, _ := testMarshalErr(v224v1, h, t, "-")
+	v224v2 := make(map[int16]uintptr)
+	testUnmarshalErr(v224v2, bs224, h, t, "-")
+	testDeepEqualErr(v224v1, v224v2, t, "-")
+	bs224, _ = testMarshalErr(&v224v1, h, t, "-")
+	v224v2 = nil
+	testUnmarshalErr(&v224v2, bs224, h, t, "-")
+	testDeepEqualErr(v224v1, v224v2, t, "-")
+
+	v225v1 := map[int16]int{0: 0}
+	bs225, _ := testMarshalErr(v225v1, h, t, "-")
+	v225v2 := make(map[int16]int)
+	testUnmarshalErr(v225v2, bs225, h, t, "-")
+	testDeepEqualErr(v225v1, v225v2, t, "-")
+	bs225, _ = testMarshalErr(&v225v1, h, t, "-")
+	v225v2 = nil
+	testUnmarshalErr(&v225v2, bs225, h, t, "-")
+	testDeepEqualErr(v225v1, v225v2, t, "-")
+
+	v226v1 := map[int16]int8{0: 0}
+	bs226, _ := testMarshalErr(v226v1, h, t, "-")
+	v226v2 := make(map[int16]int8)
+	testUnmarshalErr(v226v2, bs226, h, t, "-")
+	testDeepEqualErr(v226v1, v226v2, t, "-")
+	bs226, _ = testMarshalErr(&v226v1, h, t, "-")
+	v226v2 = nil
+	testUnmarshalErr(&v226v2, bs226, h, t, "-")
+	testDeepEqualErr(v226v1, v226v2, t, "-")
+
+	v227v1 := map[int16]int16{0: 0}
+	bs227, _ := testMarshalErr(v227v1, h, t, "-")
+	v227v2 := make(map[int16]int16)
+	testUnmarshalErr(v227v2, bs227, h, t, "-")
+	testDeepEqualErr(v227v1, v227v2, t, "-")
+	bs227, _ = testMarshalErr(&v227v1, h, t, "-")
+	v227v2 = nil
+	testUnmarshalErr(&v227v2, bs227, h, t, "-")
+	testDeepEqualErr(v227v1, v227v2, t, "-")
+
+	v228v1 := map[int16]int32{0: 0}
+	bs228, _ := testMarshalErr(v228v1, h, t, "-")
+	v228v2 := make(map[int16]int32)
+	testUnmarshalErr(v228v2, bs228, h, t, "-")
+	testDeepEqualErr(v228v1, v228v2, t, "-")
+	bs228, _ = testMarshalErr(&v228v1, h, t, "-")
+	v228v2 = nil
+	testUnmarshalErr(&v228v2, bs228, h, t, "-")
+	testDeepEqualErr(v228v1, v228v2, t, "-")
+
+	v229v1 := map[int16]int64{0: 0}
+	bs229, _ := testMarshalErr(v229v1, h, t, "-")
+	v229v2 := make(map[int16]int64)
+	testUnmarshalErr(v229v2, bs229, h, t, "-")
+	testDeepEqualErr(v229v1, v229v2, t, "-")
+	bs229, _ = testMarshalErr(&v229v1, h, t, "-")
+	v229v2 = nil
+	testUnmarshalErr(&v229v2, bs229, h, t, "-")
+	testDeepEqualErr(v229v1, v229v2, t, "-")
+
+	v230v1 := map[int16]float32{0: 0}
+	bs230, _ := testMarshalErr(v230v1, h, t, "-")
+	v230v2 := make(map[int16]float32)
+	testUnmarshalErr(v230v2, bs230, h, t, "-")
+	testDeepEqualErr(v230v1, v230v2, t, "-")
+	bs230, _ = testMarshalErr(&v230v1, h, t, "-")
+	v230v2 = nil
+	testUnmarshalErr(&v230v2, bs230, h, t, "-")
+	testDeepEqualErr(v230v1, v230v2, t, "-")
+
+	v231v1 := map[int16]float64{0: 0}
+	bs231, _ := testMarshalErr(v231v1, h, t, "-")
+	v231v2 := make(map[int16]float64)
+	testUnmarshalErr(v231v2, bs231, h, t, "-")
+	testDeepEqualErr(v231v1, v231v2, t, "-")
+	bs231, _ = testMarshalErr(&v231v1, h, t, "-")
+	v231v2 = nil
+	testUnmarshalErr(&v231v2, bs231, h, t, "-")
+	testDeepEqualErr(v231v1, v231v2, t, "-")
+
+	v232v1 := map[int16]bool{0: false}
+	bs232, _ := testMarshalErr(v232v1, h, t, "-")
+	v232v2 := make(map[int16]bool)
+	testUnmarshalErr(v232v2, bs232, h, t, "-")
+	testDeepEqualErr(v232v1, v232v2, t, "-")
+	bs232, _ = testMarshalErr(&v232v1, h, t, "-")
+	v232v2 = nil
+	testUnmarshalErr(&v232v2, bs232, h, t, "-")
+	testDeepEqualErr(v232v1, v232v2, t, "-")
+
+	v235v1 := map[int32]interface{}{0: nil}
+	bs235, _ := testMarshalErr(v235v1, h, t, "-")
+	v235v2 := make(map[int32]interface{})
+	testUnmarshalErr(v235v2, bs235, h, t, "-")
+	testDeepEqualErr(v235v1, v235v2, t, "-")
+	bs235, _ = testMarshalErr(&v235v1, h, t, "-")
+	v235v2 = nil
+	testUnmarshalErr(&v235v2, bs235, h, t, "-")
+	testDeepEqualErr(v235v1, v235v2, t, "-")
+
+	v236v1 := map[int32]string{0: ""}
+	bs236, _ := testMarshalErr(v236v1, h, t, "-")
+	v236v2 := make(map[int32]string)
+	testUnmarshalErr(v236v2, bs236, h, t, "-")
+	testDeepEqualErr(v236v1, v236v2, t, "-")
+	bs236, _ = testMarshalErr(&v236v1, h, t, "-")
+	v236v2 = nil
+	testUnmarshalErr(&v236v2, bs236, h, t, "-")
+	testDeepEqualErr(v236v1, v236v2, t, "-")
+
+	v237v1 := map[int32]uint{0: 0}
+	bs237, _ := testMarshalErr(v237v1, h, t, "-")
+	v237v2 := make(map[int32]uint)
+	testUnmarshalErr(v237v2, bs237, h, t, "-")
+	testDeepEqualErr(v237v1, v237v2, t, "-")
+	bs237, _ = testMarshalErr(&v237v1, h, t, "-")
+	v237v2 = nil
+	testUnmarshalErr(&v237v2, bs237, h, t, "-")
+	testDeepEqualErr(v237v1, v237v2, t, "-")
+
+	v238v1 := map[int32]uint8{0: 0}
+	bs238, _ := testMarshalErr(v238v1, h, t, "-")
+	v238v2 := make(map[int32]uint8)
+	testUnmarshalErr(v238v2, bs238, h, t, "-")
+	testDeepEqualErr(v238v1, v238v2, t, "-")
+	bs238, _ = testMarshalErr(&v238v1, h, t, "-")
+	v238v2 = nil
+	testUnmarshalErr(&v238v2, bs238, h, t, "-")
+	testDeepEqualErr(v238v1, v238v2, t, "-")
+
+	v239v1 := map[int32]uint16{0: 0}
+	bs239, _ := testMarshalErr(v239v1, h, t, "-")
+	v239v2 := make(map[int32]uint16)
+	testUnmarshalErr(v239v2, bs239, h, t, "-")
+	testDeepEqualErr(v239v1, v239v2, t, "-")
+	bs239, _ = testMarshalErr(&v239v1, h, t, "-")
+	v239v2 = nil
+	testUnmarshalErr(&v239v2, bs239, h, t, "-")
+	testDeepEqualErr(v239v1, v239v2, t, "-")
+
+	v240v1 := map[int32]uint32{0: 0}
+	bs240, _ := testMarshalErr(v240v1, h, t, "-")
+	v240v2 := make(map[int32]uint32)
+	testUnmarshalErr(v240v2, bs240, h, t, "-")
+	testDeepEqualErr(v240v1, v240v2, t, "-")
+	bs240, _ = testMarshalErr(&v240v1, h, t, "-")
+	v240v2 = nil
+	testUnmarshalErr(&v240v2, bs240, h, t, "-")
+	testDeepEqualErr(v240v1, v240v2, t, "-")
+
+	v241v1 := map[int32]uint64{0: 0}
+	bs241, _ := testMarshalErr(v241v1, h, t, "-")
+	v241v2 := make(map[int32]uint64)
+	testUnmarshalErr(v241v2, bs241, h, t, "-")
+	testDeepEqualErr(v241v1, v241v2, t, "-")
+	bs241, _ = testMarshalErr(&v241v1, h, t, "-")
+	v241v2 = nil
+	testUnmarshalErr(&v241v2, bs241, h, t, "-")
+	testDeepEqualErr(v241v1, v241v2, t, "-")
+
+	v242v1 := map[int32]uintptr{0: 0}
+	bs242, _ := testMarshalErr(v242v1, h, t, "-")
+	v242v2 := make(map[int32]uintptr)
+	testUnmarshalErr(v242v2, bs242, h, t, "-")
+	testDeepEqualErr(v242v1, v242v2, t, "-")
+	bs242, _ = testMarshalErr(&v242v1, h, t, "-")
+	v242v2 = nil
+	testUnmarshalErr(&v242v2, bs242, h, t, "-")
+	testDeepEqualErr(v242v1, v242v2, t, "-")
+
+	v243v1 := map[int32]int{0: 0}
+	bs243, _ := testMarshalErr(v243v1, h, t, "-")
+	v243v2 := make(map[int32]int)
+	testUnmarshalErr(v243v2, bs243, h, t, "-")
+	testDeepEqualErr(v243v1, v243v2, t, "-")
+	bs243, _ = testMarshalErr(&v243v1, h, t, "-")
+	v243v2 = nil
+	testUnmarshalErr(&v243v2, bs243, h, t, "-")
+	testDeepEqualErr(v243v1, v243v2, t, "-")
+
+	v244v1 := map[int32]int8{0: 0}
+	bs244, _ := testMarshalErr(v244v1, h, t, "-")
+	v244v2 := make(map[int32]int8)
+	testUnmarshalErr(v244v2, bs244, h, t, "-")
+	testDeepEqualErr(v244v1, v244v2, t, "-")
+	bs244, _ = testMarshalErr(&v244v1, h, t, "-")
+	v244v2 = nil
+	testUnmarshalErr(&v244v2, bs244, h, t, "-")
+	testDeepEqualErr(v244v1, v244v2, t, "-")
+
+	v245v1 := map[int32]int16{0: 0}
+	bs245, _ := testMarshalErr(v245v1, h, t, "-")
+	v245v2 := make(map[int32]int16)
+	testUnmarshalErr(v245v2, bs245, h, t, "-")
+	testDeepEqualErr(v245v1, v245v2, t, "-")
+	bs245, _ = testMarshalErr(&v245v1, h, t, "-")
+	v245v2 = nil
+	testUnmarshalErr(&v245v2, bs245, h, t, "-")
+	testDeepEqualErr(v245v1, v245v2, t, "-")
+
+	v246v1 := map[int32]int32{0: 0}
+	bs246, _ := testMarshalErr(v246v1, h, t, "-")
+	v246v2 := make(map[int32]int32)
+	testUnmarshalErr(v246v2, bs246, h, t, "-")
+	testDeepEqualErr(v246v1, v246v2, t, "-")
+	bs246, _ = testMarshalErr(&v246v1, h, t, "-")
+	v246v2 = nil
+	testUnmarshalErr(&v246v2, bs246, h, t, "-")
+	testDeepEqualErr(v246v1, v246v2, t, "-")
+
+	v247v1 := map[int32]int64{0: 0}
+	bs247, _ := testMarshalErr(v247v1, h, t, "-")
+	v247v2 := make(map[int32]int64)
+	testUnmarshalErr(v247v2, bs247, h, t, "-")
+	testDeepEqualErr(v247v1, v247v2, t, "-")
+	bs247, _ = testMarshalErr(&v247v1, h, t, "-")
+	v247v2 = nil
+	testUnmarshalErr(&v247v2, bs247, h, t, "-")
+	testDeepEqualErr(v247v1, v247v2, t, "-")
+
+	v248v1 := map[int32]float32{0: 0}
+	bs248, _ := testMarshalErr(v248v1, h, t, "-")
+	v248v2 := make(map[int32]float32)
+	testUnmarshalErr(v248v2, bs248, h, t, "-")
+	testDeepEqualErr(v248v1, v248v2, t, "-")
+	bs248, _ = testMarshalErr(&v248v1, h, t, "-")
+	v248v2 = nil
+	testUnmarshalErr(&v248v2, bs248, h, t, "-")
+	testDeepEqualErr(v248v1, v248v2, t, "-")
+
+	v249v1 := map[int32]float64{0: 0}
+	bs249, _ := testMarshalErr(v249v1, h, t, "-")
+	v249v2 := make(map[int32]float64)
+	testUnmarshalErr(v249v2, bs249, h, t, "-")
+	testDeepEqualErr(v249v1, v249v2, t, "-")
+	bs249, _ = testMarshalErr(&v249v1, h, t, "-")
+	v249v2 = nil
+	testUnmarshalErr(&v249v2, bs249, h, t, "-")
+	testDeepEqualErr(v249v1, v249v2, t, "-")
+
+	v250v1 := map[int32]bool{0: false}
+	bs250, _ := testMarshalErr(v250v1, h, t, "-")
+	v250v2 := make(map[int32]bool)
+	testUnmarshalErr(v250v2, bs250, h, t, "-")
+	testDeepEqualErr(v250v1, v250v2, t, "-")
+	bs250, _ = testMarshalErr(&v250v1, h, t, "-")
+	v250v2 = nil
+	testUnmarshalErr(&v250v2, bs250, h, t, "-")
+	testDeepEqualErr(v250v1, v250v2, t, "-")
+
+	v253v1 := map[int64]interface{}{0: nil}
+	bs253, _ := testMarshalErr(v253v1, h, t, "-")
+	v253v2 := make(map[int64]interface{})
+	testUnmarshalErr(v253v2, bs253, h, t, "-")
+	testDeepEqualErr(v253v1, v253v2, t, "-")
+	bs253, _ = testMarshalErr(&v253v1, h, t, "-")
+	v253v2 = nil
+	testUnmarshalErr(&v253v2, bs253, h, t, "-")
+	testDeepEqualErr(v253v1, v253v2, t, "-")
+
+	v254v1 := map[int64]string{0: ""}
+	bs254, _ := testMarshalErr(v254v1, h, t, "-")
+	v254v2 := make(map[int64]string)
+	testUnmarshalErr(v254v2, bs254, h, t, "-")
+	testDeepEqualErr(v254v1, v254v2, t, "-")
+	bs254, _ = testMarshalErr(&v254v1, h, t, "-")
+	v254v2 = nil
+	testUnmarshalErr(&v254v2, bs254, h, t, "-")
+	testDeepEqualErr(v254v1, v254v2, t, "-")
+
+	v255v1 := map[int64]uint{0: 0}
+	bs255, _ := testMarshalErr(v255v1, h, t, "-")
+	v255v2 := make(map[int64]uint)
+	testUnmarshalErr(v255v2, bs255, h, t, "-")
+	testDeepEqualErr(v255v1, v255v2, t, "-")
+	bs255, _ = testMarshalErr(&v255v1, h, t, "-")
+	v255v2 = nil
+	testUnmarshalErr(&v255v2, bs255, h, t, "-")
+	testDeepEqualErr(v255v1, v255v2, t, "-")
+
+	v256v1 := map[int64]uint8{0: 0}
+	bs256, _ := testMarshalErr(v256v1, h, t, "-")
+	v256v2 := make(map[int64]uint8)
+	testUnmarshalErr(v256v2, bs256, h, t, "-")
+	testDeepEqualErr(v256v1, v256v2, t, "-")
+	bs256, _ = testMarshalErr(&v256v1, h, t, "-")
+	v256v2 = nil
+	testUnmarshalErr(&v256v2, bs256, h, t, "-")
+	testDeepEqualErr(v256v1, v256v2, t, "-")
+
+	v257v1 := map[int64]uint16{0: 0}
+	bs257, _ := testMarshalErr(v257v1, h, t, "-")
+	v257v2 := make(map[int64]uint16)
+	testUnmarshalErr(v257v2, bs257, h, t, "-")
+	testDeepEqualErr(v257v1, v257v2, t, "-")
+	bs257, _ = testMarshalErr(&v257v1, h, t, "-")
+	v257v2 = nil
+	testUnmarshalErr(&v257v2, bs257, h, t, "-")
+	testDeepEqualErr(v257v1, v257v2, t, "-")
+
+	v258v1 := map[int64]uint32{0: 0}
+	bs258, _ := testMarshalErr(v258v1, h, t, "-")
+	v258v2 := make(map[int64]uint32)
+	testUnmarshalErr(v258v2, bs258, h, t, "-")
+	testDeepEqualErr(v258v1, v258v2, t, "-")
+	bs258, _ = testMarshalErr(&v258v1, h, t, "-")
+	v258v2 = nil
+	testUnmarshalErr(&v258v2, bs258, h, t, "-")
+	testDeepEqualErr(v258v1, v258v2, t, "-")
+
+	v259v1 := map[int64]uint64{0: 0}
+	bs259, _ := testMarshalErr(v259v1, h, t, "-")
+	v259v2 := make(map[int64]uint64)
+	testUnmarshalErr(v259v2, bs259, h, t, "-")
+	testDeepEqualErr(v259v1, v259v2, t, "-")
+	bs259, _ = testMarshalErr(&v259v1, h, t, "-")
+	v259v2 = nil
+	testUnmarshalErr(&v259v2, bs259, h, t, "-")
+	testDeepEqualErr(v259v1, v259v2, t, "-")
+
+	v260v1 := map[int64]uintptr{0: 0}
+	bs260, _ := testMarshalErr(v260v1, h, t, "-")
+	v260v2 := make(map[int64]uintptr)
+	testUnmarshalErr(v260v2, bs260, h, t, "-")
+	testDeepEqualErr(v260v1, v260v2, t, "-")
+	bs260, _ = testMarshalErr(&v260v1, h, t, "-")
+	v260v2 = nil
+	testUnmarshalErr(&v260v2, bs260, h, t, "-")
+	testDeepEqualErr(v260v1, v260v2, t, "-")
+
+	v261v1 := map[int64]int{0: 0}
+	bs261, _ := testMarshalErr(v261v1, h, t, "-")
+	v261v2 := make(map[int64]int)
+	testUnmarshalErr(v261v2, bs261, h, t, "-")
+	testDeepEqualErr(v261v1, v261v2, t, "-")
+	bs261, _ = testMarshalErr(&v261v1, h, t, "-")
+	v261v2 = nil
+	testUnmarshalErr(&v261v2, bs261, h, t, "-")
+	testDeepEqualErr(v261v1, v261v2, t, "-")
+
+	v262v1 := map[int64]int8{0: 0}
+	bs262, _ := testMarshalErr(v262v1, h, t, "-")
+	v262v2 := make(map[int64]int8)
+	testUnmarshalErr(v262v2, bs262, h, t, "-")
+	testDeepEqualErr(v262v1, v262v2, t, "-")
+	bs262, _ = testMarshalErr(&v262v1, h, t, "-")
+	v262v2 = nil
+	testUnmarshalErr(&v262v2, bs262, h, t, "-")
+	testDeepEqualErr(v262v1, v262v2, t, "-")
+
+	v263v1 := map[int64]int16{0: 0}
+	bs263, _ := testMarshalErr(v263v1, h, t, "-")
+	v263v2 := make(map[int64]int16)
+	testUnmarshalErr(v263v2, bs263, h, t, "-")
+	testDeepEqualErr(v263v1, v263v2, t, "-")
+	bs263, _ = testMarshalErr(&v263v1, h, t, "-")
+	v263v2 = nil
+	testUnmarshalErr(&v263v2, bs263, h, t, "-")
+	testDeepEqualErr(v263v1, v263v2, t, "-")
+
+	v264v1 := map[int64]int32{0: 0}
+	bs264, _ := testMarshalErr(v264v1, h, t, "-")
+	v264v2 := make(map[int64]int32)
+	testUnmarshalErr(v264v2, bs264, h, t, "-")
+	testDeepEqualErr(v264v1, v264v2, t, "-")
+	bs264, _ = testMarshalErr(&v264v1, h, t, "-")
+	v264v2 = nil
+	testUnmarshalErr(&v264v2, bs264, h, t, "-")
+	testDeepEqualErr(v264v1, v264v2, t, "-")
+
+	v265v1 := map[int64]int64{0: 0}
+	bs265, _ := testMarshalErr(v265v1, h, t, "-")
+	v265v2 := make(map[int64]int64)
+	testUnmarshalErr(v265v2, bs265, h, t, "-")
+	testDeepEqualErr(v265v1, v265v2, t, "-")
+	bs265, _ = testMarshalErr(&v265v1, h, t, "-")
+	v265v2 = nil
+	testUnmarshalErr(&v265v2, bs265, h, t, "-")
+	testDeepEqualErr(v265v1, v265v2, t, "-")
+
+	v266v1 := map[int64]float32{0: 0}
+	bs266, _ := testMarshalErr(v266v1, h, t, "-")
+	v266v2 := make(map[int64]float32)
+	testUnmarshalErr(v266v2, bs266, h, t, "-")
+	testDeepEqualErr(v266v1, v266v2, t, "-")
+	bs266, _ = testMarshalErr(&v266v1, h, t, "-")
+	v266v2 = nil
+	testUnmarshalErr(&v266v2, bs266, h, t, "-")
+	testDeepEqualErr(v266v1, v266v2, t, "-")
+
+	v267v1 := map[int64]float64{0: 0}
+	bs267, _ := testMarshalErr(v267v1, h, t, "-")
+	v267v2 := make(map[int64]float64)
+	testUnmarshalErr(v267v2, bs267, h, t, "-")
+	testDeepEqualErr(v267v1, v267v2, t, "-")
+	bs267, _ = testMarshalErr(&v267v1, h, t, "-")
+	v267v2 = nil
+	testUnmarshalErr(&v267v2, bs267, h, t, "-")
+	testDeepEqualErr(v267v1, v267v2, t, "-")
+
+	v268v1 := map[int64]bool{0: false}
+	bs268, _ := testMarshalErr(v268v1, h, t, "-")
+	v268v2 := make(map[int64]bool)
+	testUnmarshalErr(v268v2, bs268, h, t, "-")
+	testDeepEqualErr(v268v1, v268v2, t, "-")
+	bs268, _ = testMarshalErr(&v268v1, h, t, "-")
+	v268v2 = nil
+	testUnmarshalErr(&v268v2, bs268, h, t, "-")
+	testDeepEqualErr(v268v1, v268v2, t, "-")
+
+	v271v1 := map[bool]interface{}{false: nil}
+	bs271, _ := testMarshalErr(v271v1, h, t, "-")
+	v271v2 := make(map[bool]interface{})
+	testUnmarshalErr(v271v2, bs271, h, t, "-")
+	testDeepEqualErr(v271v1, v271v2, t, "-")
+	bs271, _ = testMarshalErr(&v271v1, h, t, "-")
+	v271v2 = nil
+	testUnmarshalErr(&v271v2, bs271, h, t, "-")
+	testDeepEqualErr(v271v1, v271v2, t, "-")
+
+	v272v1 := map[bool]string{false: ""}
+	bs272, _ := testMarshalErr(v272v1, h, t, "-")
+	v272v2 := make(map[bool]string)
+	testUnmarshalErr(v272v2, bs272, h, t, "-")
+	testDeepEqualErr(v272v1, v272v2, t, "-")
+	bs272, _ = testMarshalErr(&v272v1, h, t, "-")
+	v272v2 = nil
+	testUnmarshalErr(&v272v2, bs272, h, t, "-")
+	testDeepEqualErr(v272v1, v272v2, t, "-")
+
+	v273v1 := map[bool]uint{false: 0}
+	bs273, _ := testMarshalErr(v273v1, h, t, "-")
+	v273v2 := make(map[bool]uint)
+	testUnmarshalErr(v273v2, bs273, h, t, "-")
+	testDeepEqualErr(v273v1, v273v2, t, "-")
+	bs273, _ = testMarshalErr(&v273v1, h, t, "-")
+	v273v2 = nil
+	testUnmarshalErr(&v273v2, bs273, h, t, "-")
+	testDeepEqualErr(v273v1, v273v2, t, "-")
+
+	v274v1 := map[bool]uint8{false: 0}
+	bs274, _ := testMarshalErr(v274v1, h, t, "-")
+	v274v2 := make(map[bool]uint8)
+	testUnmarshalErr(v274v2, bs274, h, t, "-")
+	testDeepEqualErr(v274v1, v274v2, t, "-")
+	bs274, _ = testMarshalErr(&v274v1, h, t, "-")
+	v274v2 = nil
+	testUnmarshalErr(&v274v2, bs274, h, t, "-")
+	testDeepEqualErr(v274v1, v274v2, t, "-")
+
+	v275v1 := map[bool]uint16{false: 0}
+	bs275, _ := testMarshalErr(v275v1, h, t, "-")
+	v275v2 := make(map[bool]uint16)
+	testUnmarshalErr(v275v2, bs275, h, t, "-")
+	testDeepEqualErr(v275v1, v275v2, t, "-")
+	bs275, _ = testMarshalErr(&v275v1, h, t, "-")
+	v275v2 = nil
+	testUnmarshalErr(&v275v2, bs275, h, t, "-")
+	testDeepEqualErr(v275v1, v275v2, t, "-")
+
+	v276v1 := map[bool]uint32{false: 0}
+	bs276, _ := testMarshalErr(v276v1, h, t, "-")
+	v276v2 := make(map[bool]uint32)
+	testUnmarshalErr(v276v2, bs276, h, t, "-")
+	testDeepEqualErr(v276v1, v276v2, t, "-")
+	bs276, _ = testMarshalErr(&v276v1, h, t, "-")
+	v276v2 = nil
+	testUnmarshalErr(&v276v2, bs276, h, t, "-")
+	testDeepEqualErr(v276v1, v276v2, t, "-")
+
+	v277v1 := map[bool]uint64{false: 0}
+	bs277, _ := testMarshalErr(v277v1, h, t, "-")
+	v277v2 := make(map[bool]uint64)
+	testUnmarshalErr(v277v2, bs277, h, t, "-")
+	testDeepEqualErr(v277v1, v277v2, t, "-")
+	bs277, _ = testMarshalErr(&v277v1, h, t, "-")
+	v277v2 = nil
+	testUnmarshalErr(&v277v2, bs277, h, t, "-")
+	testDeepEqualErr(v277v1, v277v2, t, "-")
+
+	v278v1 := map[bool]uintptr{false: 0}
+	bs278, _ := testMarshalErr(v278v1, h, t, "-")
+	v278v2 := make(map[bool]uintptr)
+	testUnmarshalErr(v278v2, bs278, h, t, "-")
+	testDeepEqualErr(v278v1, v278v2, t, "-")
+	bs278, _ = testMarshalErr(&v278v1, h, t, "-")
+	v278v2 = nil
+	testUnmarshalErr(&v278v2, bs278, h, t, "-")
+	testDeepEqualErr(v278v1, v278v2, t, "-")
+
+	v279v1 := map[bool]int{false: 0}
+	bs279, _ := testMarshalErr(v279v1, h, t, "-")
+	v279v2 := make(map[bool]int)
+	testUnmarshalErr(v279v2, bs279, h, t, "-")
+	testDeepEqualErr(v279v1, v279v2, t, "-")
+	bs279, _ = testMarshalErr(&v279v1, h, t, "-")
+	v279v2 = nil
+	testUnmarshalErr(&v279v2, bs279, h, t, "-")
+	testDeepEqualErr(v279v1, v279v2, t, "-")
+
+	v280v1 := map[bool]int8{false: 0}
+	bs280, _ := testMarshalErr(v280v1, h, t, "-")
+	v280v2 := make(map[bool]int8)
+	testUnmarshalErr(v280v2, bs280, h, t, "-")
+	testDeepEqualErr(v280v1, v280v2, t, "-")
+	bs280, _ = testMarshalErr(&v280v1, h, t, "-")
+	v280v2 = nil
+	testUnmarshalErr(&v280v2, bs280, h, t, "-")
+	testDeepEqualErr(v280v1, v280v2, t, "-")
+
+	v281v1 := map[bool]int16{false: 0}
+	bs281, _ := testMarshalErr(v281v1, h, t, "-")
+	v281v2 := make(map[bool]int16)
+	testUnmarshalErr(v281v2, bs281, h, t, "-")
+	testDeepEqualErr(v281v1, v281v2, t, "-")
+	bs281, _ = testMarshalErr(&v281v1, h, t, "-")
+	v281v2 = nil
+	testUnmarshalErr(&v281v2, bs281, h, t, "-")
+	testDeepEqualErr(v281v1, v281v2, t, "-")
+
+	v282v1 := map[bool]int32{false: 0}
+	bs282, _ := testMarshalErr(v282v1, h, t, "-")
+	v282v2 := make(map[bool]int32)
+	testUnmarshalErr(v282v2, bs282, h, t, "-")
+	testDeepEqualErr(v282v1, v282v2, t, "-")
+	bs282, _ = testMarshalErr(&v282v1, h, t, "-")
+	v282v2 = nil
+	testUnmarshalErr(&v282v2, bs282, h, t, "-")
+	testDeepEqualErr(v282v1, v282v2, t, "-")
+
+	v283v1 := map[bool]int64{false: 0}
+	bs283, _ := testMarshalErr(v283v1, h, t, "-")
+	v283v2 := make(map[bool]int64)
+	testUnmarshalErr(v283v2, bs283, h, t, "-")
+	testDeepEqualErr(v283v1, v283v2, t, "-")
+	bs283, _ = testMarshalErr(&v283v1, h, t, "-")
+	v283v2 = nil
+	testUnmarshalErr(&v283v2, bs283, h, t, "-")
+	testDeepEqualErr(v283v1, v283v2, t, "-")
+
+	v284v1 := map[bool]float32{false: 0}
+	bs284, _ := testMarshalErr(v284v1, h, t, "-")
+	v284v2 := make(map[bool]float32)
+	testUnmarshalErr(v284v2, bs284, h, t, "-")
+	testDeepEqualErr(v284v1, v284v2, t, "-")
+	bs284, _ = testMarshalErr(&v284v1, h, t, "-")
+	v284v2 = nil
+	testUnmarshalErr(&v284v2, bs284, h, t, "-")
+	testDeepEqualErr(v284v1, v284v2, t, "-")
+
+	v285v1 := map[bool]float64{false: 0}
+	bs285, _ := testMarshalErr(v285v1, h, t, "-")
+	v285v2 := make(map[bool]float64)
+	testUnmarshalErr(v285v2, bs285, h, t, "-")
+	testDeepEqualErr(v285v1, v285v2, t, "-")
+	bs285, _ = testMarshalErr(&v285v1, h, t, "-")
+	v285v2 = nil
+	testUnmarshalErr(&v285v2, bs285, h, t, "-")
+	testDeepEqualErr(v285v1, v285v2, t, "-")
+
+	v286v1 := map[bool]bool{false: false}
+	bs286, _ := testMarshalErr(v286v1, h, t, "-")
+	v286v2 := make(map[bool]bool)
+	testUnmarshalErr(v286v2, bs286, h, t, "-")
+	testDeepEqualErr(v286v1, v286v2, t, "-")
+	bs286, _ = testMarshalErr(&v286v1, h, t, "-")
+	v286v2 = nil
+	testUnmarshalErr(&v286v2, bs286, h, t, "-")
+	testDeepEqualErr(v286v1, v286v2, t, "-")
+
+}
+
+func doTestMammothMapsAndSlices(t *testing.T, h Handle) {
+	doTestMammothSlices(t, h)
+	doTestMammothMaps(t, h)
+}

+ 0 - 15
codec/rpc.go

@@ -11,14 +11,6 @@ import (
 	"sync"
 )
 
-// // rpcEncodeTerminator allows a handler specify a []byte terminator to send after each Encode.
-// //
-// // Some codecs like json need to put a space after each encoded value, to serve as a
-// // delimiter for things like numbers (else json codec will continue reading till EOF).
-// type rpcEncodeTerminator interface {
-// 	rpcEncodeTerminate() []byte
-// }
-
 // Rpc provides a rpc Server or Client Codec for rpc communication.
 type Rpc interface {
 	ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec
@@ -84,17 +76,10 @@ func (c *rpcCodec) write(obj1, obj2 interface{}, writeObj2, doFlush bool) (err e
 	if err = c.enc.Encode(obj1); err != nil {
 		return
 	}
-	// t, tOk := c.h.(rpcEncodeTerminator)
-	// if tOk {
-	// 	c.bw.Write(t.rpcEncodeTerminate())
-	// }
 	if writeObj2 {
 		if err = c.enc.Encode(obj2); err != nil {
 			return
 		}
-		// if tOk {
-		// 	c.bw.Write(t.rpcEncodeTerminate())
-		// }
 	}
 	if doFlush {
 		return c.bw.Flush()

+ 9 - 11
codec/shared_test.go

@@ -194,8 +194,8 @@ func testInitAll() {
 	}
 }
 
-func testCodecEncode(ts interface{}, bsIn []byte,
-	fn func([]byte) *bytes.Buffer, h Handle) (bs []byte, err error) {
+func sTestCodecEncode(ts interface{}, bsIn []byte, fn func([]byte) *bytes.Buffer,
+	h Handle, bh *BasicHandle) (bs []byte, err error) {
 	// bs = make([]byte, 0, approxSize)
 	var e *Encoder
 	var buf *bytes.Buffer
@@ -204,7 +204,6 @@ func testCodecEncode(ts interface{}, bsIn []byte,
 	} else {
 		e = NewEncoder(nil, h)
 	}
-	bh := BasicHandleDoNotUse(h)
 	var oldWriteBufferSize int
 	if testUseIoEncDec >= 0 {
 		buf = fn(bsIn)
@@ -232,7 +231,7 @@ func testCodecEncode(ts interface{}, bsIn []byte,
 	return
 }
 
-func testCodecDecode(bs []byte, ts interface{}, h Handle) (err error) {
+func sTestCodecDecode(bs []byte, ts interface{}, h Handle, bh *BasicHandle) (err error) {
 	var d *Decoder
 	// var buf *bytes.Reader
 	if testUseReset {
@@ -240,7 +239,6 @@ func testCodecDecode(bs []byte, ts interface{}, h Handle) (err error) {
 	} else {
 		d = NewDecoder(nil, h)
 	}
-	bh := BasicHandleDoNotUse(h)
 	var oldReadBufferSize int
 	if testUseIoEncDec >= 0 {
 		buf := bytes.NewReader(bs)
@@ -275,10 +273,10 @@ func fnBenchmarkByteBuf(bsIn []byte) (buf *bytes.Buffer) {
 	return
 }
 
-func benchFnCodecEncode(ts interface{}, bsIn []byte, h Handle) (bs []byte, err error) {
-	return testCodecEncode(ts, bsIn, fnBenchmarkByteBuf, h)
-}
+// func benchFnCodecEncode(ts interface{}, bsIn []byte, h Handle) (bs []byte, err error) {
+// 	return testCodecEncode(ts, bsIn, fnBenchmarkByteBuf, h)
+// }
 
-func benchFnCodecDecode(bs []byte, ts interface{}, h Handle) (err error) {
-	return testCodecDecode(bs, ts, h)
-}
+// func benchFnCodecDecode(bs []byte, ts interface{}, h Handle) (err error) {
+// 	return testCodecDecode(bs, ts, h)
+// }

+ 63 - 9
codec/values_test.go

@@ -28,16 +28,26 @@ type stringUint64T struct {
 }
 
 type AnonInTestStruc struct {
-	AS        string
-	AI64      int64
-	AI16      int16
-	AUi64     uint64
-	ASslice   []string
-	AI64slice []int64
-	AF64slice []float64
+	AS         string
+	AI64       int64
+	AI16       int16
+	AUi64      uint64
+	ASslice    []string
+	AI64slice  []int64
+	AUi64slice []uint64
+	AF64slice  []float64
+	AF32slice  []float32
+
 	// AMI32U32  map[int32]uint32
 	// AMU32F64 map[uint32]float64 // json/bson do not like it
 	AMSU16 map[string]uint16
+
+	// use these to test 0-len or nil slices/maps/arrays
+	AI64arr0    [0]int64
+	A164slice0  []int64
+	AUi64sliceN []uint64
+	AMSU16N     map[string]uint16
+	AMSU16E     map[string]uint16
 }
 
 type AnonInTestStrucIntf struct {
@@ -224,8 +234,27 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us
 			strRpt(n, "Athree"),
 			strRpt(n, "Afour.reverse_solidus.\u005c"),
 			strRpt(n, "Afive.Gclef.\U0001d11E\"ugorji\"done.")},
-		AI64slice: []int64{1, -22, 333, -4444, 55555, -666666},
-		AMSU16:    map[string]uint16{strRpt(n, "1"): 1, strRpt(n, "22"): 2, strRpt(n, "333"): 3, strRpt(n, "4444"): 4},
+		AI64slice: []int64{
+			0, 1, -1, -22, 333, -4444, 55555, -666666,
+			// standard ones
+			0, -1, 1,
+			math.MaxInt8, math.MaxInt8 + 4, math.MaxInt8 - 4,
+			math.MaxInt16, math.MaxInt16 + 4, math.MaxInt16 - 4,
+			math.MaxInt32, math.MaxInt32 + 4, math.MaxInt32 - 4,
+			math.MaxInt64, math.MaxInt64 - 4,
+		},
+		AUi64slice: []uint64{
+			0, 1, 22, 333, 4444, 55555, 666666,
+			// standard ones
+			math.MaxUint8, math.MaxUint8 + 4, math.MaxUint8 - 4,
+			math.MaxUint16, math.MaxUint16 + 4, math.MaxUint16 - 4,
+			math.MaxUint32, math.MaxUint32 + 4, math.MaxUint32 - 4,
+			math.MaxUint64, math.MaxUint64 - 4,
+		},
+		AMSU16: map[string]uint16{strRpt(n, "1"): 1, strRpt(n, "22"): 2, strRpt(n, "333"): 3, strRpt(n, "4444"): 4},
+
+		// Note: +/- inf, NaN, and other non-representable numbers should not be explicitly tested here
+
 		AF64slice: []float64{
 			11.11e-11, -11.11e+11,
 			2.222E+12, -2.222E-12,
@@ -237,7 +266,32 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us
 			// these below are hairy enough to need strconv.ParseFloat
 			33.33E-33, -33.33E+33,
 			44.44e+44, -44.44e-44,
+			// standard ones
+			0, -1, 1,
+			// math.Inf(1), math.Inf(-1),
+			math.Pi, math.Phi, math.E,
+			math.MaxFloat64, math.SmallestNonzeroFloat64,
 		},
+		AF32slice: []float32{
+			11.11e-11, -11.11e+11,
+			2.222E+12, -2.222E-12,
+			-555.55E-5, 555.55E+5,
+			666.66E-6, -666.66E+6,
+			7777.7777E-7, -7777.7777E-7,
+			-8888.8888E+8, 8888.8888E+8,
+			-99999.9999E+9, 99999.9999E+9,
+			// these below are hairy enough to need strconv.ParseFloat
+			33.33E-33, -33.33E+33,
+			// standard ones
+			0, -1, 1,
+			// math.Float32frombits(0x7FF00000), math.Float32frombits(0xFFF00000), //+inf and -inf
+			math.MaxFloat32, math.SmallestNonzeroFloat32,
+		},
+
+		A164slice0:  []int64{},
+		AUi64sliceN: nil,
+		AMSU16N:     nil,
+		AMSU16E:     map[string]uint16{},
 	}
 
 	*ts = testStrucCommon{

+ 67 - 2
codec/z_all_test.go

@@ -164,6 +164,43 @@ func testCodecGroup(t *testing.T) {
 	t.Run("TestJsonLargeInteger", TestJsonLargeInteger)
 	t.Run("TestJsonDecodeNonStringScalarInStringContext", TestJsonDecodeNonStringScalarInStringContext)
 	t.Run("TestJsonEncodeIndent", TestJsonEncodeIndent)
+
+	t.Run("TestJsonSwallowAndZero", TestJsonSwallowAndZero)
+	t.Run("TestCborSwallowAndZero", TestCborSwallowAndZero)
+	t.Run("TestMsgpackSwallowAndZero", TestMsgpackSwallowAndZero)
+	t.Run("TestBincSwallowAndZero", TestBincSwallowAndZero)
+	t.Run("TestSimpleSwallowAndZero", TestSimpleSwallowAndZero)
+	t.Run("TestJsonRawExt", TestJsonRawExt)
+	t.Run("TestCborRawExt", TestCborRawExt)
+	t.Run("TestMsgpackRawExt", TestMsgpackRawExt)
+	t.Run("TestBincRawExt", TestBincRawExt)
+	t.Run("TestSimpleRawExt", TestSimpleRawExt)
+	t.Run("TestJsonMapStructKey", TestJsonMapStructKey)
+	t.Run("TestCborMapStructKey", TestCborMapStructKey)
+	t.Run("TestMsgpackMapStructKey", TestMsgpackMapStructKey)
+	t.Run("TestBincMapStructKey", TestBincMapStructKey)
+	t.Run("TestSimpleMapStructKey", TestSimpleMapStructKey)
+	t.Run("TestJsonDecodeNilMapValue", TestJsonDecodeNilMapValue)
+	t.Run("TestCborDecodeNilMapValue", TestCborDecodeNilMapValue)
+	t.Run("TestMsgpackDecodeNilMapValue", TestMsgpackDecodeNilMapValue)
+	t.Run("TestBincDecodeNilMapValue", TestBincDecodeNilMapValue)
+	t.Run("TestSimpleDecodeNilMapValue", TestSimpleDecodeNilMapValue)
+	t.Run("TestJsonEmbeddedFieldPrecedence", TestJsonEmbeddedFieldPrecedence)
+	t.Run("TestCborEmbeddedFieldPrecedence", TestCborEmbeddedFieldPrecedence)
+	t.Run("TestMsgpackEmbeddedFieldPrecedence", TestMsgpackEmbeddedFieldPrecedence)
+	t.Run("TestBincEmbeddedFieldPrecedence", TestBincEmbeddedFieldPrecedence)
+	t.Run("TestSimpleEmbeddedFieldPrecedence", TestSimpleEmbeddedFieldPrecedence)
+	t.Run("TestJsonLargeContainerLen", TestJsonLargeContainerLen)
+	t.Run("TestCborLargeContainerLen", TestCborLargeContainerLen)
+	t.Run("TestMsgpackLargeContainerLen", TestMsgpackLargeContainerLen)
+	t.Run("TestBincLargeContainerLen", TestBincLargeContainerLen)
+	t.Run("TestSimpleLargeContainerLen", TestSimpleLargeContainerLen)
+	t.Run("TestJsonMammothMapsAndSlices", TestJsonMammothMapsAndSlices)
+	t.Run("TestCborMammothMapsAndSlices", TestCborMammothMapsAndSlices)
+	t.Run("TestMsgpackMammothMapsAndSlices", TestMsgpackMammothMapsAndSlices)
+	t.Run("TestBincMammothMapsAndSlices", TestBincMammothMapsAndSlices)
+	t.Run("TestSimpleMammothMapsAndSlices", TestSimpleMammothMapsAndSlices)
+
 	// <tear-down code>
 }
 
@@ -179,6 +216,14 @@ func testJsonGroup(t *testing.T) {
 	t.Run("TestJsonLargeInteger", TestJsonLargeInteger)
 	t.Run("TestJsonDecodeNonStringScalarInStringContext", TestJsonDecodeNonStringScalarInStringContext)
 	t.Run("TestJsonEncodeIndent", TestJsonEncodeIndent)
+
+	t.Run("TestJsonSwallowAndZero", TestJsonSwallowAndZero)
+	t.Run("TestJsonRawExt", TestJsonRawExt)
+	t.Run("TestJsonMapStructKey", TestJsonMapStructKey)
+	t.Run("TestJsonDecodeNilMapValue", TestJsonDecodeNilMapValue)
+	t.Run("TestJsonEmbeddedFieldPrecedence", TestJsonEmbeddedFieldPrecedence)
+	t.Run("TestJsonLargeContainerLen", TestJsonLargeContainerLen)
+	t.Run("TestJsonMammothMapsAndSlices", TestJsonMammothMapsAndSlices)
 }
 
 func testBincGroup(t *testing.T) {
@@ -190,6 +235,14 @@ func testBincGroup(t *testing.T) {
 	t.Run("TestBincRaw", TestBincRaw)
 	t.Run("TestSimpleRpcGo", TestSimpleRpcGo)
 	t.Run("TestBincUnderlyingType", TestBincUnderlyingType)
+
+	t.Run("TestBincSwallowAndZero", TestBincSwallowAndZero)
+	t.Run("TestBincRawExt", TestBincRawExt)
+	t.Run("TestBincMapStructKey", TestBincMapStructKey)
+	t.Run("TestBincDecodeNilMapValue", TestBincDecodeNilMapValue)
+	t.Run("TestBincEmbeddedFieldPrecedence", TestBincEmbeddedFieldPrecedence)
+	t.Run("TestBincLargeContainerLen", TestBincLargeContainerLen)
+	t.Run("TestBincMammothMapsAndSlices", TestBincMammothMapsAndSlices)
 }
 
 func testCborGroup(t *testing.T) {
@@ -202,6 +255,14 @@ func testCborGroup(t *testing.T) {
 	t.Run("TestCborMammoth", TestCborMammoth)
 	t.Run("TestCborRaw", TestCborRaw)
 	t.Run("TestCborRpcGo", TestCborRpcGo)
+
+	t.Run("TestCborSwallowAndZero", TestCborSwallowAndZero)
+	t.Run("TestCborRawExt", TestCborRawExt)
+	t.Run("TestCborMapStructKey", TestCborMapStructKey)
+	t.Run("TestCborDecodeNilMapValue", TestCborDecodeNilMapValue)
+	t.Run("TestCborEmbeddedFieldPrecedence", TestCborEmbeddedFieldPrecedence)
+	t.Run("TestCborLargeContainerLen", TestCborLargeContainerLen)
+	t.Run("TestCborMammothMapsAndSlices", TestCborMammothMapsAndSlices)
 }
 
 func TestCodecSuite(t *testing.T) {
@@ -209,11 +270,13 @@ func TestCodecSuite(t *testing.T) {
 
 	testGroupResetFlags()
 
-	oldIndent, oldCharsAsis, oldPreferFloat := testJsonH.Indent, testJsonH.HTMLCharsAsIs, testJsonH.PreferFloat
+	oldIndent, oldCharsAsis, oldPreferFloat, oldMapKeyAsString :=
+		testJsonH.Indent, testJsonH.HTMLCharsAsIs, testJsonH.PreferFloat, testJsonH.MapKeyAsString
 
 	testMaxInitLen = 10
 	testJsonH.Indent = 8
 	testJsonH.HTMLCharsAsIs = true
+	testJsonH.MapKeyAsString = true
 	// testJsonH.PreferFloat = true
 	testReinit()
 	t.Run("json-spaces-htmlcharsasis-initLen10", testJsonGroup)
@@ -221,11 +284,13 @@ func TestCodecSuite(t *testing.T) {
 	testMaxInitLen = 10
 	testJsonH.Indent = -1
 	testJsonH.HTMLCharsAsIs = false
+	testJsonH.MapKeyAsString = true
 	// testJsonH.PreferFloat = false
 	testReinit()
 	t.Run("json-tabs-initLen10", testJsonGroup)
 
-	testJsonH.Indent, testJsonH.HTMLCharsAsIs, testJsonH.PreferFloat = oldIndent, oldCharsAsis, oldPreferFloat
+	testJsonH.Indent, testJsonH.HTMLCharsAsIs, testJsonH.PreferFloat, testJsonH.MapKeyAsString =
+		oldIndent, oldCharsAsis, oldPreferFloat, oldMapKeyAsString
 
 	oldIndefLen := testCborH.IndefiniteLength