diff options
Diffstat (limited to 'spew/spew_test.go')
| -rw-r--r-- | spew/spew_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spew/spew_test.go b/spew/spew_test.go index 406edc1..76df103 100644 --- a/spew/spew_test.go +++ b/spew/spew_test.go @@ -50,6 +50,14 @@ func testFailed(result string, wants []string) bool { return true } +// panicer is used to intentionally cause a panic for testing spew properly +// handles them +type panicer int + +func (p panicer) String() string { + panic("test panic") +} + // spewFunc is used to identify which public function of the spew package or // ConfigState a test applies to. type spewFunc int |
