(t *testing.T)
| 718 | } |
| 719 | |
| 720 | func TestChain_Stacktrace(t *testing.T) { |
| 721 | handler := &mockAssertionHandler{} |
| 722 | |
| 723 | chain := newChainWithConfig("test", Config{ |
| 724 | AssertionHandler: handler, |
| 725 | }.withDefaults()) |
| 726 | |
| 727 | opChain := chain.enter("test") |
| 728 | opChain.fail(testFailure()) |
| 729 | opChain.leave() |
| 730 | |
| 731 | assert.True(t, opChain.failed()) |
| 732 | assert.NotNil(t, handler.failure) |
| 733 | |
| 734 | assert.GreaterOrEqual(t, len(handler.failure.Stacktrace), 2) |
| 735 | assert.Contains(t, handler.failure.Stacktrace[0].FuncName, "(*chain).fail") |
| 736 | assert.Contains(t, handler.failure.Stacktrace[1].FuncName, "TestChain_Stacktrace") |
| 737 | } |
| 738 | |
| 739 | func TestChain_Reporting(t *testing.T) { |
| 740 | handler := &mockAssertionHandler{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…