(t *testing.T)
| 1356 | } |
| 1357 | |
| 1358 | func TestPanics(t *testing.T) { |
| 1359 | |
| 1360 | mockT := new(testing.T) |
| 1361 | |
| 1362 | if !Panics(mockT, func() { |
| 1363 | panic("Panic!") |
| 1364 | }) { |
| 1365 | t.Error("Panics should return true") |
| 1366 | } |
| 1367 | |
| 1368 | if Panics(mockT, func() { |
| 1369 | }) { |
| 1370 | t.Error("Panics should return false") |
| 1371 | } |
| 1372 | |
| 1373 | } |
| 1374 | |
| 1375 | func TestPanicsWithValue(t *testing.T) { |
| 1376 |