-
Notifications
You must be signed in to change notification settings - Fork 114
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
Silently failing LaunchConfigurationTabGroupViewerTest#testOnlyDefaultTabInOtherConfigIsActivated #1075
Labels
Comments
fedejeanne
added a commit
to fedejeanne/eclipse.platform
that referenced
this issue
Mar 27, 2024
- Remove invalid usages of java.util.function.Predicate.not - Change assertions in testOnlyDefaultTabInOtherConfigIsActivated and reactivate the test - Replace calls to assertj's "matches" method with calls to isTrue/isFalse to improve readability (also, some calls were wrong) Fixes eclipse-platform#1075
fedejeanne
added a commit
to fedejeanne/eclipse.platform
that referenced
this issue
Mar 27, 2024
- Remove invalid usages of java.util.function.Predicate.not - Change assertions in testOnlyDefaultTabInOtherConfigIsActivated and reactivate the test - Replace calls to assertj's "matches" method with calls to isTrue/isFalse to improve readability (also, some calls were wrong) Fixes eclipse-platform#1075
fedejeanne
added a commit
to fedejeanne/eclipse.platform
that referenced
this issue
Mar 27, 2024
- Check for the activation (instead of the initialization) of other tabs testOnlyDefaultTabInOtherConfigIsActivated and reactivate the test. - Provide meaningful toString() method for SpyTab to improve assertion messages. - Use extra parameter when calling the "matches" method to improve readability Fixes eclipse-platform#1075
HeikoKlare
pushed a commit
that referenced
this issue
Mar 27, 2024
- Check for the activation (instead of the initialization) of other tabs testOnlyDefaultTabInOtherConfigIsActivated and reactivate the test. - Provide meaningful toString() method for SpyTab to improve assertion messages. - Use extra parameter when calling the "matches" method to improve readability Fixes #1075
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Two test cases added with #860 are broken:
They make false use of the
not
matcher from hamcrest, e.g.:eclipse.platform/debug/org.eclipse.debug.tests/src/org/eclipse/debug/tests/ui/LaunchConfigurationTabGroupViewerTest.java
Line 133 in ef98ac4
The test class erroneously imports AssertJ's
assertThat
to which passing a matcher object is valid (other than to HamcrestsassertThat
), but AssertJ'sassertThat
does nothing if no actual assert method is called afterwards (such asisTrue()
for a boolean assertion). Thus, the two assertions usingnot
within this class do actually not assert anything.In addition, one of the assertions, namely the one in
LaunchConfigurationTabGroupViewerTest#testOnlyDefaultTabInOtherConfigIsActivated()
, fails if it is corrected. The tabs are initialized although they are assumed to not have been initialized. So there is either a flaw in the test or some bug in the tested code.A correction could look as follows:
The text was updated successfully, but these errors were encountered: