(ctx context.Context, t *testctx.T)
| 76 | } |
| 77 | |
| 78 | func (ModuleSuite) TestDescription(ctx context.Context, t *testctx.T) { |
| 79 | type source struct { |
| 80 | file string |
| 81 | contents string |
| 82 | } |
| 83 | for i, tc := range []struct { |
| 84 | sdk string |
| 85 | sources []source |
| 86 | }{ |
| 87 | { |
| 88 | sdk: "go", |
| 89 | sources: []source{ |
| 90 | { |
| 91 | file: "main.go", |
| 92 | contents: ` |
| 93 | // Test module, short description |
| 94 | // |
| 95 | // Long description, with full sentences. |
| 96 | |
| 97 | package main |
| 98 | |
| 99 | // Test object, short description |
| 100 | type Test struct { |
| 101 | // +default="foo" |
| 102 | Foo string |
| 103 | } |
| 104 | `, |
| 105 | }, |
| 106 | }, |
| 107 | }, |
| 108 | { |
| 109 | sdk: "go", |
| 110 | sources: []source{ |
| 111 | { |
| 112 | file: "a.go", |
| 113 | contents: ` |
| 114 | // First, but not main |
| 115 | package main |
| 116 | |
| 117 | type Foo struct {} |
| 118 | `, |
| 119 | }, |
| 120 | { |
| 121 | file: "z.go", |
| 122 | contents: ` |
| 123 | // Test module, short description |
| 124 | // |
| 125 | // Long description, with full sentences. |
| 126 | |
| 127 | package main |
| 128 | |
| 129 | // Test object, short description |
| 130 | type Test struct { |
| 131 | } |
| 132 | |
| 133 | func (*Test) Foo() Foo { |
| 134 | return Foo{} |
| 135 | } |
nothing calls this directly
no test coverage detected