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

not null matcher should show the value that was meant to be null #1942

Closed
sksamuel opened this issue Dec 24, 2020 · 3 comments · Fixed by #1955
Closed

not null matcher should show the value that was meant to be null #1942

sksamuel opened this issue Dec 24, 2020 · 3 comments · Fixed by #1955
Labels
assertions 🔍 Related to the assertion mechanisms within the testing framework. enhancement ✨ Suggestions for adding new features or improving existing ones.
Milestone

Comments

@sksamuel
Copy link
Member

return MatcherResult(passed, "Expected value to be null, but was not-null.", "Expected value to not be null, but was null.")

@sksamuel
Copy link
Member Author

a.shouldBeNull()

should show what a was if it wasn't null

@sksamuel sksamuel added assertions 🔍 Related to the assertion mechanisms within the testing framework. enhancement ✨ Suggestions for adding new features or improving existing ones. labels Dec 24, 2020
@sksamuel sksamuel added this to the 4.4 milestone Dec 24, 2020
This was referenced Dec 24, 2020
@glasser
Copy link
Contributor

glasser commented Dec 24, 2020

I think the issue title here is a bit off — the "not null" matcher doesn't need any context (since the answer on failure is always null), just the "null" matcher.

@sksamuel sksamuel changed the title not null matcher should show the value that was meant to be not null not null matcher should show the value that was meant to be null Dec 24, 2020
@sksamuel
Copy link
Member Author

Yes, thanks, updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assertions 🔍 Related to the assertion mechanisms within the testing framework. enhancement ✨ Suggestions for adding new features or improving existing ones.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants