IJPL-155974 cleanup

GitOrigin-RevId: bd620ecf4a6ded0e385353723bb80b3941280a65
This commit is contained in:
Vladimir Krivosheev
2024-06-26 07:29:32 +02:00
committed by intellij-monorepo-bot
parent 3a9c8f6948
commit e82400eb49
6 changed files with 38 additions and 28 deletions

View File

@@ -35,6 +35,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.BiPredicate;
import static org.assertj.core.api.Assertions.assertThat;
public class GotoActionTest extends LightJavaCodeInsightFixtureTestCase {
private static final DataKey<Boolean> SHOW_HIDDEN_KEY = DataKey.create("GotoActionTest.DataKey");
private static final Comparator<MatchedValue> MATCH_COMPARATOR = MatchedValue::compareWeights;
@@ -294,13 +296,21 @@ public class GotoActionTest extends LightJavaCodeInsightFixtureTestCase {
List<String> patterns = List.of("support screen readers", "show line numbers", "tab placement");
List<Object> errors = new ArrayList<>();
patterns.forEach(pattern -> {
for (String pattern : patterns) {
List<?> elements = ChooseByNameTest.calcContributorElements(contributor, pattern);
if (!ContainerUtil.exists(elements, matchedValue -> isNavigableOption(((MatchedValue)matchedValue).value))) {
boolean result = false;
for (Object t : elements) {
if (isNavigableOption(((MatchedValue)t).value)) {
result = true;
break;
}
}
if (!result) {
errors.add("Failure for pattern '" + pattern + "' - " + elements);
}
});
assertTrue(errors.isEmpty());
}
assertThat(errors).isEmpty();
}
public void testUseUpdatedPresentationForMatching() {