(b *testing.B)
| 294 | } |
| 295 | |
| 296 | func BenchmarkMapperSlice(b *testing.B) { |
| 297 | var fromSlice []*FromStruct |
| 298 | var toSlice []*ToStruct |
| 299 | for i := 0; i < 10; i++ { |
| 300 | fromSlice = append(fromSlice, &FromStruct{Name: "From" + strconv.Itoa(i), Sex: true, AA: "AA" + strconv.Itoa(i)}) |
| 301 | } |
| 302 | for i := 0; i < b.N; i++ { |
| 303 | MapperSlice(fromSlice, &toSlice) |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | func Test_AutoMapper(t *testing.T) { |
| 308 | from := &FromStruct{Name: "From", Sex: true, AA: "AA"} |
nothing calls this directly
no test coverage detected
searching dependent graphs…