Skip to content

Add a function for expecting a panic.#6

Merged
liquidgecka merged 1 commit into
masterfrom
brady/add_expect_panic
Jan 23, 2018
Merged

Add a function for expecting a panic.#6
liquidgecka merged 1 commit into
masterfrom
brady/add_expect_panic

Conversation

@liquidgecka

Copy link
Copy Markdown
Owner

No description provided.

@liquidgecka liquidgecka force-pushed the brady/add_expect_panic branch from 7b7eaea to 5191dd4 Compare January 23, 2018 04:47
@coveralls

coveralls commented Jan 23, 2018

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling 4959b2e on brady/add_expect_panic into be1f6d7 on master.

@liquidgecka liquidgecka force-pushed the brady/add_expect_panic branch from 5191dd4 to 4959b2e Compare January 23, 2018 05:02
@liquidgecka liquidgecka merged commit 561e6b2 into master Jan 23, 2018
@liquidgecka liquidgecka deleted the brady/add_expect_panic branch January 23, 2018 05:16
Comment thread expect.go

// Expects the function passed in to panic. This will call f() and expect
// that an error matching err will be raised as a panic.
func (t *T) ExpectPanic(f func(), err interface{}, desc ...string) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be called err, since it's not error but "whatever was panic'd"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very true.. addressed here: #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants