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

Supply expected and actual values for failed boolean assertions #1781

Closed
2 tasks done
sbrannen opened this issue Feb 16, 2019 · 3 comments
Closed
2 tasks done

Supply expected and actual values for failed boolean assertions #1781

sbrannen opened this issue Feb 16, 2019 · 3 comments

Comments

@sbrannen
Copy link
Member

sbrannen commented Feb 16, 2019

Background

This issue was raised in the Eclipse bug tracker by @noopur2507.

Status Quo

The assertTrue() and assertFalse() methods in org.junit.jupiter.api.Assertions do not supply the actual and expected boolean values to the org.opentest4j.AssertionFailedError constructor. This is inconsistent with other assertions and can cause problems for tools that rely on the presence of the actual and expected values -- such as Eclipse's support for displaying multiple failures in a pop-up window.

Deliverables

  • Ensure that appropriate Boolean values are supplied to the AssertionFailedError constructor for all assertTrue() and assertFalse() variants.
  • Document in the Release Notes.
@gopinath-langote
Copy link
Contributor

I can pick this.

@sbrannen
Copy link
Member Author

I can pick this.

Go for it!

Please make sure you include tests in your PR that demonstrate that the expected and actual values are in fact present in the thrown AssertionFailedError.

@sbrannen
Copy link
Member Author

Marked as in progress since @gopinath-langote has volunteered.

@gopinath-langote, please keep us posted on your progress.

maheshpec added a commit to maheshpec/junit5 that referenced this issue Feb 17, 2019
…True and assertFalse

Prior to this change, assertTrue and assertFalse were not passing the
original values to the constructor for AssertionFailedError. IDEs that
understand AssertionFailedError were not able to parse the values
because of this. This enhancement fixes the problem by passing the
values
gopinath-langote added a commit to gopinath-langote/junit5 that referenced this issue Feb 17, 2019
…nhanced IDE support.

Issue: junit-team#1781

Prior this commit, The  and  methods in  do not supply the actual and expected boolean values to the  constructor. This is inconsistent with other assertions and can cause problems for tools that rely on the presence of the actual and expected values -- such as Eclipse's support for displaying multiple failures in a pop-up window.
gopinath-langote added a commit to gopinath-langote/junit5 that referenced this issue Feb 17, 2019
@marcphilipp marcphilipp modified the milestones: 5.5 M1, 5.5 M2 Mar 8, 2019
@ghost ghost removed the status: in progress label Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants