@@ -136,6 +136,9 @@ func TestUnmarshalToStructWithPointerAttr_BadType_bool(t *testing.T) {
136
136
if err .Error () != expectedErrorMessage {
137
137
t .Fatalf ("Unexpected error message: %s" , err .Error ())
138
138
}
139
+ if _ , ok := err .(ErrUnsupportedPtrType ); ! ok {
140
+ t .Fatalf ("Unexpected error type: %s" , reflect .TypeOf (err ))
141
+ }
139
142
}
140
143
141
144
func TestUnmarshalToStructWithPointerAttr_BadType_MapPtr (t * testing.T ) {
@@ -153,6 +156,9 @@ func TestUnmarshalToStructWithPointerAttr_BadType_MapPtr(t *testing.T) {
153
156
if err .Error () != expectedErrorMessage {
154
157
t .Fatalf ("Unexpected error message: %s" , err .Error ())
155
158
}
159
+ if _ , ok := err .(ErrUnsupportedPtrType ); ! ok {
160
+ t .Fatalf ("Unexpected error type: %s" , reflect .TypeOf (err ))
161
+ }
156
162
}
157
163
158
164
func TestUnmarshalToStructWithPointerAttr_BadType_Struct (t * testing.T ) {
@@ -171,6 +177,9 @@ func TestUnmarshalToStructWithPointerAttr_BadType_Struct(t *testing.T) {
171
177
if err .Error () != expectedErrorMessage {
172
178
t .Fatalf ("Unexpected error message: %s" , err .Error ())
173
179
}
180
+ if _ , ok := err .(ErrUnsupportedPtrType ); ! ok {
181
+ t .Fatalf ("Unexpected error type: %s" , reflect .TypeOf (err ))
182
+ }
174
183
}
175
184
176
185
func TestUnmarshalToStructWithPointerAttr_BadType_IntSlice (t * testing.T ) {
@@ -189,6 +198,9 @@ func TestUnmarshalToStructWithPointerAttr_BadType_IntSlice(t *testing.T) {
189
198
if err .Error () != expectedErrorMessage {
190
199
t .Fatalf ("Unexpected error message: %s" , err .Error ())
191
200
}
201
+ if _ , ok := err .(ErrUnsupportedPtrType ); ! ok {
202
+ t .Fatalf ("Unexpected error type: %s" , reflect .TypeOf (err ))
203
+ }
192
204
}
193
205
194
206
func TestStringPointerField (t * testing.T ) {
0 commit comments