MCPcopy Create free account
hub / github.com/apache/fory / commonMap

Function commonMap

go/fory/fory_test.go:80–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78}
79
80func commonMap() []any {
81 return []any{
82 // TODO: map[string]bool with false values has a pre-existing serialization bug
83 // where false values become true after deserialization. Skip until fixed.
84 // map[string]bool{"k1": false, "k2": true, "str": true, "": true},
85 map[string]byte{"k1": 1, "k2": 1, "str": 2, "": 3},
86 map[string]int8{"k1": 1, "k2": 1, "str": 2, "": 3},
87 map[string]int16{"k1": 1, "k2": 1, "str": 2, "": 3},
88 map[string]int32{"k1": 1, "k2": 1, "str": 2, "": 3},
89 map[string]int64{"k1": 1, "k2": 1, "str": 2, "": 3},
90 map[string]float32{"k1": 1, "k2": 1, "str": 2, "": 3},
91 map[string]float64{"k1": 1, "k2": 1, "str": 2, "": 3},
92 map[string]int32{"k1": 1, "k2": -1, "str": 2, "": 3},
93 map[string]string{"k1": "v1", "k2": "v2", "str": "", "": ""},
94 // TODO: map[bool]bool with false values has a pre-existing serialization bug. Skip until fixed.
95 // map[bool]bool{true: false, false: true},
96 map[byte]byte{1: 1, 2: 2, 3: 3},
97 map[int8]int8{1: 1, 2: 2, 3: 3},
98 map[int16]int16{1: 1, 2: 2, 3: 3},
99 map[int32]int32{1: 1, 2: 2, 3: 3},
100 map[int64]int64{1: 1, 2: 2, 3: 3},
101 map[float32]float32{1: 1, 2: 2, 3: 3},
102 map[float64]float64{1: 1, 2: 2, 3: 3},
103 map[any]any{"k1": "v1", "k2": "v2", "str": "", "": ""},
104 map[string]any{"k1": "v1", "k2": "v2", "str": "", "": ""},
105 map[any]string{"k1": "v1", "k2": "v2", "str": "", "": ""},
106 }
107}
108
109func commonArray() []any {
110 return []any{

Callers 6

TestSerializeMapFunction · 0.85
TestMapEachIndividuallyFunction · 0.85
TestReferenceResolverFunction · 0.85
TestNonReferenceResolverFunction · 0.85
TestNullableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected