(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestMergedBodiesContent(t *testing.T) { |
| 15 | tests := []struct { |
| 16 | Bodies []Body |
| 17 | Schema *BodySchema |
| 18 | Want *BodyContent |
| 19 | DiagCount int |
| 20 | }{ |
| 21 | { |
| 22 | []Body{}, |
| 23 | &BodySchema{}, |
| 24 | &BodyContent{ |
| 25 | Attributes: map[string]*Attribute{}, |
| 26 | }, |
| 27 | 0, |
| 28 | }, |
| 29 | { |
| 30 | []Body{}, |
| 31 | &BodySchema{ |
| 32 | Attributes: []AttributeSchema{ |
| 33 | { |
| 34 | Name: "name", |
| 35 | }, |
| 36 | }, |
| 37 | }, |
| 38 | &BodyContent{ |
| 39 | Attributes: map[string]*Attribute{}, |
| 40 | }, |
| 41 | 0, |
| 42 | }, |
| 43 | { |
| 44 | []Body{}, |
| 45 | &BodySchema{ |
| 46 | Attributes: []AttributeSchema{ |
| 47 | { |
| 48 | Name: "name", |
| 49 | Required: true, |
| 50 | }, |
| 51 | }, |
| 52 | }, |
| 53 | &BodyContent{ |
| 54 | Attributes: map[string]*Attribute{}, |
| 55 | }, |
| 56 | 1, |
| 57 | }, |
| 58 | { |
| 59 | []Body{ |
| 60 | &testMergedBodiesVictim{ |
| 61 | HasAttributes: []string{"name"}, |
| 62 | }, |
| 63 | }, |
| 64 | &BodySchema{ |
| 65 | Attributes: []AttributeSchema{ |
| 66 | { |
| 67 | Name: "name", |
| 68 | }, |
| 69 | }, |
| 70 | }, |
| 71 | &BodyContent{ |
nothing calls this directly
no test coverage detected