Codebase list golang-github-kolo-xmlrpc / 4ccfbd3
add failing test for nil-struct Ilia Choly 5 years ago
1 changed file(s) with 17 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
139139 }
140140 }
141141
142 const structEmptyXML = `
143 <value>
144 <struct>
145 </struct>
146 </value>
147 `
148
149 func Test_unmarshalEmptyStruct(t *testing.T) {
150 var v interface{}
151 if err := unmarshal([]byte(structEmptyXML), &v); err != nil {
152 t.Fatal(err)
153 }
154 if v == nil {
155 t.Fatalf("got nil map")
156 }
157 }
158
142159 const arrayValueXML = `
143160 <value>
144161 <array>