Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing/checkers: fix panic in IsTrue #34

Merged

Conversation

davecheney
Copy link
Contributor

Fixes a panic caused by not handling an empty interface value, the zero value for interface{} properly.

This came up with a test case that tried

c.Assert(m["somekey", jc.IsTrue)

Which would panic if "somekey" was missing from the map.

Fixes a panic caused by not handling an empty interface value, the zero value for interface{} properly.

This came up with a test case that tried

    c.Assert(m["somekey", jc.IsTrue)

Which would panic if "somekey" was missing from the map.
@jameinel
Copy link
Member

LGTM

davecheney added a commit that referenced this pull request Sep 10, 2014
…-value-to-bool

testing/checkers: fix panic in IsTrue
@davecheney davecheney merged commit 422bbb7 into master Sep 10, 2014
@hpidcock hpidcock deleted the 100-fix-panic-testing-zero-interface-value-to-bool branch July 14, 2023 01:44
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.

None yet

2 participants