(t *testing.T)
| 16 | } |
| 17 | |
| 18 | func TestIssue149(t *testing.T) { |
| 19 | dest := &token{ |
| 20 | User: &user{ |
| 21 | Name: "destination", |
| 22 | }, |
| 23 | Token: nil, |
| 24 | } |
| 25 | tokenValue := "Issue149" |
| 26 | src := &token{ |
| 27 | User: nil, |
| 28 | Token: &tokenValue, |
| 29 | } |
| 30 | if err := mergo.Merge(dest, src, mergo.WithOverwriteWithEmptyValue); err != nil { |
| 31 | t.Error(err) |
| 32 | } |
| 33 | if dest.User != nil { |
| 34 | t.Errorf("expected nil User, got %q", dest.User) |
| 35 | } |
| 36 | if dest.Token == nil { |
| 37 | t.Errorf("expected not nil Token, got %q", *dest.Token) |
| 38 | } |
| 39 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…