diff options
author | Tor Norbye <tnorbye@google.com> | 2013-08-16 00:12:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-08-16 00:12:25 +0000 |
commit | bb2fc4a79dd544c91510116bc692e0b8b09d2341 (patch) | |
tree | 0702eb3cac4e88f147ed472f6039d16a0dfbac9c /java/java-tests/testSrc | |
parent | d679193f6abc72710352d6f1678b572236651caf (diff) | |
parent | 08600181b2f24618135923b6159eac5e45d963b5 (diff) | |
download | idea-bb2fc4a79dd544c91510116bc692e0b8b09d2341.tar.gz |
Merge "Merge remote-tracking branch 'aosp/snapshot-master' into merge"
Diffstat (limited to 'java/java-tests/testSrc')
4 files changed, 71 insertions, 5 deletions
diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AdvHighlightingJdk7Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AdvHighlightingJdk7Test.java index b35c8ff68061..dcac1068a631 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AdvHighlightingJdk7Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/AdvHighlightingJdk7Test.java @@ -199,7 +199,31 @@ public class AdvHighlightingJdk7Test extends DaemonAnalyzerTestCase { doTestAmbiguous(); } + public void testAmbiguousIDEA67864() throws Exception { + doTestAmbiguous(); + } + + public void testAmbiguousIDEA67836() throws Exception { + doTestAmbiguous(); + } + + public void testAmbiguousIDEA67576() throws Exception { + doTestAmbiguous(); + } + + public void testAmbiguousIDEA67519() throws Exception { + doTestAmbiguous(); + } + + public void testAmbiguousIDEA57569() throws Exception { + doTestAmbiguous(); + } + public void testAmbiguousMethodsFromSameClassAccess() throws Exception { doTestAmbiguous(); } + + public void testAmbiguousIDEA57633() throws Exception { + doTestAmbiguous(); + } } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java index efc253f27847..3fef647dbaa3 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/GenericsHighlightingTest.java @@ -310,6 +310,9 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase { public void testIDEA57439() { doTest5(false); } public void testIDEA57312() { doTest5(false); } public void testIDEA67865() { doTest5(false); } + public void testBoxingSpecific() { doTest5(false); } + public void testIDEA67843() { doTest5(false); } + public void testAmbiguousTypeParamVsConcrete() { doTest5(false); } public void testJavaUtilCollections_NoVerify() throws Exception { PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule())); diff --git a/java/java-tests/testSrc/com/intellij/refactoring/MovePackageAsDirectoryTest.java b/java/java-tests/testSrc/com/intellij/refactoring/MovePackageAsDirectoryTest.java index 589f935ec34d..01b8604f0e0a 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/MovePackageAsDirectoryTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/MovePackageAsDirectoryTest.java @@ -22,10 +22,8 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileAdapter; import com.intellij.openapi.vfs.VirtualFileEvent; import com.intellij.openapi.vfs.VirtualFileManager; -import com.intellij.psi.JavaPsiFacade; -import com.intellij.psi.PsiDirectory; -import com.intellij.psi.PsiFile; -import com.intellij.psi.PsiPackage; +import com.intellij.psi.*; +import com.intellij.psi.search.GlobalSearchScope; import com.intellij.refactoring.move.moveClassesOrPackages.MoveDirectoryWithClassesProcessor; import com.intellij.testFramework.PsiTestUtil; import junit.framework.Assert; @@ -80,10 +78,10 @@ public class MovePackageAsDirectoryTest extends MultiFileTestCase { doTest(createAction("pack1", "target")); } + private static final String EMPTY_TXT = "empty.txt"; public void testXmlEmptyDirRefs() throws Exception { final String packageName = "pack1"; doTest(new MyPerformAction(packageName, "target"){ - private static final String EMPTY_TXT = "empty.txt"; @Override protected void preprocessSrcDir(PsiDirectory srcDirectory) { final PsiFile empty = srcDirectory.findFile(EMPTY_TXT); @@ -108,6 +106,36 @@ public class MovePackageAsDirectoryTest extends MultiFileTestCase { }); } + public void testEmptySubDirs() throws Exception { + final String packageName = "pack1"; + doTest(new MyPerformAction(packageName, "target"){ + private static final String FOO = "pack1.subPack.Foo"; + @Override + protected void preprocessSrcDir(PsiDirectory srcDirectory) { + final PsiClass empty = JavaPsiFacade.getInstance(getProject()).findClass(FOO, GlobalSearchScope.projectScope(getProject())); + assert empty != null; + ApplicationManager.getApplication().runWriteAction(new Runnable() { + public void run() { + empty.delete(); + } + }); + } + + @Override + protected void postProcessTargetDir(PsiDirectory targetDirectory) { + final PsiDirectory subdirectory = targetDirectory.findSubdirectory(packageName); + assert subdirectory != null; + final PsiDirectory emptyDir = subdirectory.findSubdirectory("subPack"); + assert emptyDir != null; + ApplicationManager.getApplication().runWriteAction(new Runnable() { + public void run() { + emptyDir.createFile(EMPTY_TXT); + } + }); + } + }); + } + private PerformAction createAction(final String packageName, final String targetPackageName) { return new MyPerformAction(packageName, targetPackageName); } diff --git a/java/java-tests/testSrc/com/intellij/refactoring/RenameCollisionsTest.java b/java/java-tests/testSrc/com/intellij/refactoring/RenameCollisionsTest.java index 5fe6fbe06a68..2caa921ab3fc 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/RenameCollisionsTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/RenameCollisionsTest.java @@ -167,6 +167,17 @@ public class RenameCollisionsTest extends LightRefactoringTestCase { fail("Conflicts were not found"); } + public void testRenameMethodCollisionSameSignature() throws Exception { + try { + doTest("foo1"); + } + catch (BaseRefactoringProcessor.ConflictsInTestsException e) { + Assert.assertEquals("Method with same erasure is already defined in the class <b><code>RenameTest</code></b>.", e.getMessage()); + return; + } + fail("Conflicts were not found"); + } + public void testRenameMethodNoCollisionWithOtherSignature() throws Exception { doTest("foo2"); } |