-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented panic handling within test and step wrappers. (#21)
- Loading branch information
1 parent
52d4576
commit 1bc7fdc
Showing
4 changed files
with
56 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package example | ||
|
||
import ( | ||
"github.com/dailymotion/allure-go" | ||
"testing" | ||
) | ||
|
||
func TestPanicBasic(t *testing.T) { | ||
allure.Test(t, "Panic handling test", func() { | ||
panic("throwing a panic") | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package example | ||
|
||
import ( | ||
"github.com/dailymotion/allure-go" | ||
"testing" | ||
) | ||
|
||
func TestPanicInStep(t *testing.T) { | ||
allure.Test(t, "Panic handling test", func() { | ||
allure.Step("step that will panic", func() { | ||
panic("throwing a panic") | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters