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

org.eclipse.tips.core.TipTest.testEqualsObject() fails #140 #142

Merged

Conversation

vrubezhny
Copy link
Contributor

@vrubezhny vrubezhny commented Jun 7, 2023

Fixes: #140

@jukzi
Copy link
Contributor

jukzi commented Jun 7, 2023

Can you please investigate and fix why this unit test is not executed
https://ci.eclipse.org/platform/job/eclipse.platform.ua/job/PR-142/1/testReport/

@vrubezhny
Copy link
Contributor Author

Can you please investigate and fix why this unit test is not executed https://ci.eclipse.org/platform/job/eclipse.platform.ua/job/PR-142/1/testReport/

Not sure, but it looks like none of org.eclipse.tips.core.Tpi*Test tests where included to any of test suites., like it's done for example, in org.eclipse.ua.tests plugin.

@jukzi
Copy link
Contributor

jukzi commented Jun 7, 2023

Then they are probably not added to a suite or the suite is not referenced in the build configuration.

assertNotNull(testTip);
assertEquals(testTip, testTip.equals(testTip));
assertFalse(testTip.equals(fTip));
assertTrue(testTip.equals(testTipx));
Copy link
Contributor

Choose a reason for hiding this comment

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

better use assertEquals/NotEquals with the right arguments

Copy link
Member

Choose a reason for hiding this comment

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

This is in a test specifically for "equals" method thus I believe it's better to call the method directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Invocation of .equals() is made intentionally - that's what the test is exactly developed for - to test equals() work on these objects, as far as I understand.

The duplicating extra testing work done in the following two lines:

assertNotEquals(fTip, testTip);
assertEquals(testTipx, testTip);

but this is not the goal, it's done more to prove the .equals() -like assertions in two previous lines.

@vrubezhny
Copy link
Contributor Author

Then they are probably not added to a suite or the suite is not referenced in the build configuration.

Exactly

@akurtakov akurtakov merged commit eae64a4 into eclipse-platform:master Jun 8, 2023
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.

org.eclipse.tips.core.TipTest.testEqualsObject() fails
3 participants