Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[1.x] Improvment even number rule performance #100
[1.x] Improvment even number rule performance #100
Changes from all commits
ba9da9c
93519d3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I’ve recently noticed some unfairness toward this Repo, but I sincerely appreciate you submitting this PR and supporting it.
My question is: Does checking for even or odd in decimal numbers have any specific meaning in mathematics?
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. It doesn't mean anything. But in your code, the same number fails the test... You can try. Even though the number is even....
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.
Therefore, the test that has been written does not provide adequate coverage.
First, the test should be refactored to address this issue.
The best approach would be to use data providers in the PHPUnittest to cover a variety of values effectively.
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.
I apologize. Does the current test provide adequate coverage?? If it did, I think the code on decimal numbers should not be in trouble...
What exactly is your idea? Can you provide a reference?
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.
No, the tests are not sufficient. For example, you are using gmp, but there are no tests for large numbers, or for cases like
2abc
and ...Do we need to write a separate test for each case? The answer is NO.
You can use data providers to cover all these cases with a single method. Please refer to the link below.
https://docs.phpunit.de/en/10.5/writing-tests-for-phpunit.html#data-providers