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

shoaib/issue#439 #465

Closed

Conversation

sshaikshoaib
Copy link

i have changed .equals function to .compareTo function. hope it works

i have changed .equals function to .compareTo function
@cyrille-artho
Copy link
Member

Thank you for your implementation. Please also provide a unit test so we know that the new version of the code works as intended. See the wiki for instructions on how to write unit tests: https://github.com/javapathfinder/jpf-core/wiki/Writing-JPF-tests

Copy link
Member

@cyrille-artho cyrille-artho left a comment

Choose a reason for hiding this comment

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

Please add a unit test, as this part of the code is currently not covered by a test, so we don't know if your change fixes the issue.

@sshaikshoaib
Copy link
Author

Hi @cyrille-artho I am a beginner and I have a good knowledge on java.so i used this knowledge to rectify the issue.
so give me some time as Iam a beginner I don't know how to write test cases.
But i have an Immense interest in contributing to java projects.so can you just me how to write test cases

i have added the test - public void testEqualsWithNonStringObject() - to verify my updated code
@sshaikshoaib
Copy link
Author

i have added the required tests for the updated code. please revies that and suggest me if any updates required

@cyrille-artho
Copy link
Member

Hi,
Thank you for the test. It fails, which means the test shows the problem with the typecast not happening as expected, but the code change in the main code does not fix the bug yet.

 i have added a check for objects in equals function
@cyrille-artho
Copy link
Member

Thanks! This patch seems to fix the problem. To merge it, can you please remove the extra file .vscode/settings.json? You accidentally added it, and you can simply use git rm -f .vscode/settings.json followed by a commit on your branch (shoaib/issue#439) to remove it. Once you push that change, this pull request will be updated automatically.

@cyrille-artho
Copy link
Member

Subsumed by #491

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants