-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
Normalize breakingSpaces like regular whiteSpaces #3120
Normalize breakingSpaces like regular whiteSpaces #3120
Conversation
assertj-core/src/main/java/org/assertj/core/internal/Strings.java
Outdated
Show resolved
Hide resolved
assertj-core/src/main/java/org/assertj/core/internal/Strings.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @maximedezette! I've put some comments.
Could you please also enhance the Javadoc as mentioned in #3113 (comment)?
Lastly, the build is failing due to formatting issues. You can run ./mvnw spotless:apply
to make sure that all changes adhere to the expected code style.
assertj-core/src/main/java/org/assertj/core/internal/Strings.java
Outdated
Show resolved
Hide resolved
assertj-core/src/main/java/org/assertj/core/internal/Strings.java
Outdated
Show resolved
Hide resolved
...t/java/org/assertj/core/internal/strings/Strings_assertEqualsNormalizingWhitespace_Test.java
Outdated
Show resolved
Hide resolved
1b874bb
to
5670feb
Compare
229e4f1
to
0d5edf8
Compare
@maximedezette This PR has now several merge conflicts but you don't need to worry about them: I've taken the opportunity to do some refactoring in the surrounding area to better evaluate if we should also change other assertions relying on whitespaces. Once I'm done with the refactoring, I'll cherry-pick your changes maintaining you as the author. |
0d5edf8
to
86fd497
Compare
@scordio I have missed your comment mentioning the cherry-pick and I've done the rebase 😅 I have thrown away a bit of code about the refactoring of non-breaking spaces tests but I'll do an other PR if I feel that it could improve the tests after your refactoring 👍 |
@maximedezette sorry for the slow feedback! I just refreshed your branch and made some cosmetic changes. Also, I noticed that this change will also affect Would you like to add the missing tests? No problem if you don't have time, I can take care of them next week. |
@scordio I don't have time at the moment but if it can wait a few days, I should be able to add those tests this week 👍 |
bb71108
to
1b97713
Compare
Thanks for your first contribution, @maximedezette! |
Check List:
Following the contributing guidelines will make it easier for us to review and accept your PR.
Note
I think that the breaking-space management could be improved by using a public constant so that we don't have to update all the tests if some of the breaking space codes change over time. It would look like this:
Instead of having to update all the tests:
What do you think ?