(t *testing.T)
| 331 | } |
| 332 | |
| 333 | func Test_MapperMap(t *testing.T) { |
| 334 | validateTime, _ := time.Parse("2006-01-02 15:04:05", "2017-01-01 10:00:00") |
| 335 | fromMap := make(map[string]interface{}) |
| 336 | fromMap["Name"] = "test" |
| 337 | fromMap["Sex"] = true |
| 338 | fromMap["Age"] = 10 |
| 339 | fromMap["Time"] = validateTime |
| 340 | fromMap["Time2"] = validateTime |
| 341 | toObj := &testStruct{} |
| 342 | err := MapperMap(fromMap, toObj) |
| 343 | if err != nil && toObj.Time != validateTime { |
| 344 | t.Error("RunResult error: mapper error", err) |
| 345 | } else { |
| 346 | t.Log("RunResult success:", toObj) |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | func Test_MapToSlice(t *testing.T) { |
| 351 | var toSlice []*testStruct |
nothing calls this directly
no test coverage detected
searching dependent graphs…