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

[7.x] Fix ExpectationMessage.update(failureMessage:) not to update a FailureMessage instance with empty string #587

Merged
merged 3 commits into from
Aug 5, 2018

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Aug 4, 2018

The followings is the previous (problematic) behavior:

  • FailureMessage().toExpectationMessage() will be ExpectationMessage.fail("")
  • ExpectationMessage.fail("").update(failureMessage: aMessage) will set aMessage.stringValue = ""
  • Thus the error message of expect(1).to(MatcherFunc { _, _ in false }.predicate) will be empty

ikesyo added 2 commits August 5, 2018 01:01
…lureMessage` instance with empty string

The followings is the previous behavior:

- `FailureMessage().toExpectationMessage()` will be `ExpectationMessage.fail("")`
- `ExpectationMessage.fail("").update(failureMessage: aMessage)` will set `aMessage.stringValue = ""`
- Thus the error message of `expect(1).to(MatcherFunc { _, _ in false }.predicate)` will be empty
@ikesyo ikesyo added the bug label Aug 4, 2018
@ikesyo ikesyo requested a review from a team August 4, 2018 17:31
Copy link
Member

@ashfurrow ashfurrow left a comment

Choose a reason for hiding this comment

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

Makes sense to me 👍

@ikesyo
Copy link
Member Author

ikesyo commented Aug 5, 2018

Thanks @ashfurrow!

@ikesyo ikesyo merged commit b144799 into 7.x-branch Aug 5, 2018
@ikesyo ikesyo deleted the fix-predicate-fromdeprecatedclosure branch August 5, 2018 01:54
Megal pushed a commit to Megal/Nimble that referenced this pull request Jul 31, 2019
…losure

[7.x] Fix `ExpectationMessage.update(failureMessage:)` not to update a `FailureMessage` instance with empty string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants