(t *testing.T)
| 155 | } |
| 156 | |
| 157 | func TestCheck_error(t *testing.T) { |
| 158 | errorTests := []struct{ code, err string }{ |
| 159 | { |
| 160 | `Foo.Bar.Not`, |
| 161 | ` |
| 162 | type mock.Bar has no field Not (1:9) |
| 163 | | Foo.Bar.Not |
| 164 | | ........^ |
| 165 | `, |
| 166 | }, |
| 167 | { |
| 168 | `Noo`, |
| 169 | ` |
| 170 | unknown name Noo (1:1) |
| 171 | | Noo |
| 172 | | ^ |
| 173 | `, |
| 174 | }, |
| 175 | { |
| 176 | `Foo()`, ` |
| 177 | mock.Foo is not callable (1:1) |
| 178 | | Foo() |
| 179 | | ^ |
| 180 | `, |
| 181 | }, |
| 182 | { |
| 183 | `Foo['bar']`, ` |
| 184 | type mock.Foo has no field bar (1:4) |
| 185 | | Foo['bar'] |
| 186 | | ...^ |
| 187 | `, |
| 188 | }, |
| 189 | { |
| 190 | `Foo.Method(42)`, |
| 191 | ` |
| 192 | too many arguments to call Method (1:5) |
| 193 | | Foo.Method(42) |
| 194 | | ....^ |
| 195 | `, |
| 196 | }, |
| 197 | {`Foo.Bar()`, ` |
| 198 | mock.Bar is not callable (1:5) |
| 199 | | Foo.Bar() |
| 200 | | ....^ |
| 201 | `, |
| 202 | }, |
| 203 | {`Foo.Bar.Not()`, ` |
| 204 | type mock.Bar has no method Not (1:9) |
| 205 | | Foo.Bar.Not() |
| 206 | | ........^ |
| 207 | `, |
| 208 | }, |
| 209 | {`ArrayOfFoo[0].Not`, ` |
| 210 | type mock.Foo has no field Not (1:15) |
| 211 | | ArrayOfFoo[0].Not |
| 212 | | ..............^ |
| 213 | `, |
| 214 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…