Esempio n. 1
0
func TestPanicDeepEqualFailure(t *testing.T) {
	var c capture
	func() {
		defer ensure.PanicDeepEqual(&c, 1)
		panic(2)
	}()
	c.Contains(t, `TestPanicDeepEqualFailure
expected these to be equal:
ACTUAL:
(int) 2

EXPECTED:
(int) 1`)
}
Esempio n. 2
0
func TestPanicDeepEqualSuccess(t *testing.T) {
	defer ensure.PanicDeepEqual(t, 1)
	panic(1)
}
Esempio n. 3
0
func TestPanicDeepEqualNil(t *testing.T) {
	defer ensure.PanicDeepEqual(t, "can't pass nil to ensure.PanicDeepEqual")
	ensure.PanicDeepEqual(t, nil)
}