summaryrefslogtreecommitdiff
path: root/assert
diff options
context:
space:
mode:
Diffstat (limited to 'assert')
-rw-r--r--assert/panic.go2
-rw-r--r--assert/panic_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/assert/panic.go b/assert/panic.go
index 69828a4..e19b815 100644
--- a/assert/panic.go
+++ b/assert/panic.go
@@ -26,7 +26,7 @@ func PanicsWith[T any](t TestingTB, action func()) T {
value, ok := result.Panic.(T)
if !ok {
var zero T
- t.Fatalf("panicked with incorrect type: expected %T, but got %#v", zero, result.Panic)
+ t.Fatalf("panicked with incorrect type: expected %T, but got %T: %#v", zero, result.Panic, result.Panic)
}
return value
}
diff --git a/assert/panic_test.go b/assert/panic_test.go
index 135ce18..a3d6877 100644
--- a/assert/panic_test.go
+++ b/assert/panic_test.go
@@ -30,6 +30,6 @@ func TestPanics(t *testing.T) {
})
assert.Equal(t, tc.Outcome, testcapture.OutcomeFailed)
assert.Equal(t, tc.Messages, []testcapture.Message{
- testcapture.Log("panicked with incorrect type: expected string, but got 42"),
+ testcapture.Log("panicked with incorrect type: expected string, but got int: 42"),
})
}