java-tests module introduced
authorDmitry Jemerov <yole@intellij.com>
Thu, 10 Sep 2009 13:59:25 +0000 (17:59 +0400)
committerDmitry Jemerov <yole@intellij.com>
Thu, 10 Sep 2009 13:59:25 +0000 (17:59 +0400)
.idea/modules.xml
community-main.iml
java/java-tests/java-tests.iml [new file with mode: 0644]
java/java-tests/testData/refactoring/anonymousToInner/genericTypeParameters.java [moved from testData/refactoring/anonymousToInner/genericTypeParameters.java with 100% similarity]
java/java-tests/testData/refactoring/anonymousToInner/genericTypeParameters_after.java [moved from testData/refactoring/anonymousToInner/genericTypeParameters_after.java with 100% similarity]
java/java-tests/testSrc/com/intellij/JavaTestUtil.java [new file with mode: 0644]
java/java-tests/testSrc/com/intellij/refactoring/AnonymousToInnerTest.java [moved from refactoring/tests/com/intellij/refactoring/AnonymousToInnerTest.java with 89% similarity]

index 969cd141d4a86840563af013f7b444aabbc4a345..1f789ed48f14912ae09826e41f5f1a7d8d6aba13 100644 (file)
@@ -29,6 +29,7 @@
       <module fileurl="file://$PROJECT_DIR$/plugins/java-i18n/java-i18n.iml" filepath="$PROJECT_DIR$/plugins/java-i18n/java-i18n.iml" group="plugins" />
       <module fileurl="file://$PROJECT_DIR$/java/java-impl/java-impl.iml" filepath="$PROJECT_DIR$/java/java-impl/java-impl.iml" group="java" />
       <module fileurl="file://$PROJECT_DIR$/java/java-runtime/java-runtime.iml" filepath="$PROJECT_DIR$/java/java-runtime/java-runtime.iml" group="java" />
+      <module fileurl="file://$PROJECT_DIR$/java/java-tests/java-tests.iml" filepath="$PROJECT_DIR$/java/java-tests/java-tests.iml" />
       <module fileurl="file://$PROJECT_DIR$/java/compiler/javac2/javac2.iml" filepath="$PROJECT_DIR$/java/compiler/javac2/javac2.iml" group="java/compiler" />
       <module fileurl="file://$PROJECT_DIR$/plugins/cvs/javacvs-src/javacvs-src.iml" filepath="$PROJECT_DIR$/plugins/cvs/javacvs-src/javacvs-src.iml" group="plugins/cvs" />
       <module fileurl="file://$PROJECT_DIR$/java/jsp-base-openapi/jsp-base-openapi.iml" filepath="$PROJECT_DIR$/java/jsp-base-openapi/jsp-base-openapi.iml" group="java" />
index c68b38302ccf5305c5a5c42c218cc72d80a3bcda..52a14b717105b135c7c79f6c734045580cb158b8 100644 (file)
     <orderEntry type="module" module-name="xml" />
     <orderEntry type="module" module-name="xml-openapi" />
     <orderEntry type="module" module-name="community-resources" />
+    <orderEntry type="module" module-name="java-tests" />
+    <orderEntry type="module" module-name="copyright" />
+    <orderEntry type="module" module-name="cvs-plugin" />
+    <orderEntry type="module" module-name="java-i18n" />
+    <orderEntry type="module" module-name="ui-designer" />
   </component>
 </module>
 
diff --git a/java/java-tests/java-tests.iml b/java/java-tests/java-tests.iml
new file mode 100644 (file)
index 0000000..080bb50
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/testSrc" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="testFramework-java" />
+    <orderEntry type="module" module-name="java-impl" />
+  </component>
+</module>
+
diff --git a/java/java-tests/testSrc/com/intellij/JavaTestUtil.java b/java/java-tests/testSrc/com/intellij/JavaTestUtil.java
new file mode 100644 (file)
index 0000000..c623e42
--- /dev/null
@@ -0,0 +1,22 @@
+package com.intellij;
+
+import com.intellij.openapi.application.PathManager;
+import org.jetbrains.annotations.NonNls;
+
+import java.io.File;
+
+/**
+ * @author yole
+ */
+public class JavaTestUtil {
+  @NonNls private static final String JAVA_TEST_DATA = "java/java-tests/testData";
+
+  public static String getJavaTestDataPath() {
+    final String homePath = PathManager.getHomePath();
+    File dir = new File(homePath, "community/" + JAVA_TEST_DATA);
+    if (dir.exists()) {
+      return dir.getPath();
+    }
+    return new File(homePath, JAVA_TEST_DATA).getPath();
+  }
+}
similarity index 89%
rename from refactoring/tests/com/intellij/refactoring/AnonymousToInnerTest.java
rename to java/java-tests/testSrc/com/intellij/refactoring/AnonymousToInnerTest.java
index f62afae9e45aa07b96f63ed231dca5755da7e0ae..56d224e294effdab7493ca48d228d7b7a6a19fb0 100644 (file)
@@ -1,5 +1,6 @@
 package com.intellij.refactoring;
 
+import com.intellij.JavaTestUtil;
 import com.intellij.codeInsight.CodeInsightTestCase;
 import com.intellij.openapi.projectRoots.Sdk;
 import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;
@@ -12,6 +13,11 @@ public class AnonymousToInnerTest extends CodeInsightTestCase {
   private static final String TEST_ROOT = "/refactoring/anonymousToInner/";
 
   @Override
+  protected String getTestDataPath() {
+    return JavaTestUtil.getJavaTestDataPath();
+  }
+
+  @Override
   protected Sdk getTestProjectJdk() {
     return JavaSdkImpl.getMockJdk15("java 1.5");
   }