From 61e2582ca90ca428187b6832b050b483bad89538 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 5 Oct 2011 17:29:58 +0200 Subject: [PATCH] some tests made more ready to the live templates advent --- .../codeInsight/completion/style/before6.java | 2 +- .../codeInsight/completion/CompletionStyleTest.java | 2 +- .../completion/NormalCompletionTest.groovy | 11 +++-------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/java/java-tests/testData/codeInsight/completion/style/before6.java b/java/java-tests/testData/codeInsight/completion/style/before6.java index 9d26c328544a..f4cbe08f6903 100644 --- a/java/java-tests/testData/codeInsight/completion/style/before6.java +++ b/java/java-tests/testData/codeInsight/completion/style/before6.java @@ -1,5 +1,5 @@ class A{ { - boolean a = false; + boolean a = Afalse; } } \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/CompletionStyleTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/completion/CompletionStyleTest.java index 8662d02606df..d0fcb5e33bdf 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/CompletionStyleTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/CompletionStyleTest.java @@ -133,7 +133,7 @@ public class CompletionStyleTest extends LightCodeInsightTestCase{ configureByFile(path + "/before6.java"); performNormalCompletion(); - select(Lookup.REPLACE_SELECT_CHAR, 3); //equals(), true & false go first + select(Lookup.REPLACE_SELECT_CHAR, 0); checkResultByFile(path + "/after6.java"); } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy index b76c67c7e4b6..3504f999d695 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/completion/NormalCompletionTest.groovy @@ -238,18 +238,13 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase { public void testObjectsInThrowsBlock() throws Exception { configureByFile("InThrowsCompletion.java"); - - Arrays.sort(myItems); - assertTrue("Exception not found", Arrays.binarySearch(myItems, "C") > 0); - assertFalse("Found not an Exception", Arrays.binarySearch(myItems, "B") > 0); + assert "C" in myFixture.lookupElementStrings + assert !("B" in myFixture.lookupElementStrings) } public void testAfterInstanceof() throws Exception { configureByFile("AfterInstanceof.java"); - - assertNotNull(myItems); - Arrays.sort(myItems); - assertTrue("Classes not found after instanceof", Arrays.binarySearch(myItems, "A") >= 0); + assert "A" in myFixture.lookupElementStrings } public void testAfterCast1() throws Exception {