diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-08-18 13:40:20 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-08-18 13:40:20 +0200 |
| commit | a3ccdd9f491c20771cfda343ebebd4b5d0ea6602 (patch) | |
| tree | f0ad530dd072c55c6f46dfea23af993fb31333d4 /assert | |
| parent | 5d17264c8ab8042042162f3b968557aabc4976b3 (diff) | |
| download | go-gg-a3ccdd9f491c20771cfda343ebebd4b5d0ea6602.tar.gz | |
test coverage for microprom
Diffstat (limited to 'assert')
| -rw-r--r-- | assert/panic.go | 2 | ||||
| -rw-r--r-- | assert/panic_test.go | 2 |
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"), }) } |
