(t *testing.T, ref *Reference, kind ReferenceType)
| 260 | } |
| 261 | |
| 262 | func checkRefType(t *testing.T, ref *Reference, kind ReferenceType) { |
| 263 | if ref.Type() == kind { |
| 264 | return |
| 265 | } |
| 266 | |
| 267 | // The failure happens at wherever we were called, not here |
| 268 | _, file, line, ok := runtime.Caller(1) |
| 269 | if !ok { |
| 270 | t.Fatalf("Unable to get caller") |
| 271 | } |
| 272 | t.Fatalf("Wrong ref type at %v:%v; have %v, expected %v", file, line, ref.Type(), kind) |
| 273 | } |
no test coverage detected
searching dependent graphs…