From 4135d127e658e0a461c75e648f02a5a12b735315 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 31 Aug 2013 12:23:18 +0200 Subject: [PATCH] make tests more independent from all/imported classes behavior --- .../normalSorting/PreferApplicableAnnotationsMethod.java | 2 +- .../completion/NormalCompletionOrderingTest.groovy | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/java/java-tests/testData/codeInsight/completion/normalSorting/PreferApplicableAnnotationsMethod.java b/java/java-tests/testData/codeInsight/completion/normalSorting/PreferApplicableAnnotationsMethod.java index 345e8cccbcf0..c7a557cf2e28 100644 --- a/java/java-tests/testData/codeInsight/completion/normalSorting/PreferApplicableAnnotationsMethod.java +++ b/java/java-tests/testData/codeInsight/completion/normalSorting/PreferApplicableAnnotationsMethod.java @@ -1,5 +1,5 @@ class Foo { - @T + @Tx public static void main(String[] args) { } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy index 0c07fcb300a5..e15f08d9ab68 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionOrderingTest.groovy @@ -398,11 +398,14 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Target; @Target({ElementType.TYPE}) -@interface TClassAnno {} +@interface TxClassAnno {} + +interface TxANotAnno {} @Target({ElementType.METHOD}) -@interface TMethodAnno {}''' - checkPreferredItems 0, 'TMethodAnno', 'TClassAnno' +@interface TxMethodAnno {}''' + checkPreferredItems 0, 'TxMethodAnno', 'TxClassAnno' + assert !('TxANotAnno' in myFixture.lookupElementStrings) } public void testJComponentAddNewWithStats() throws Throwable {