Merge remote-tracking branch 'origin/master' appcode/142.2008 clion/142.2007
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 26 May 2015 08:44:37 +0000 (10:44 +0200)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 26 May 2015 08:44:37 +0000 (10:44 +0200)
java/java-tests/testSrc/com/intellij/openapi/vfs/JrtFileSystemTest.java
platform/platform-tests/testSrc/com/intellij/lang/PsiBuilderQuickTest.java
platform/platform-tests/testSrc/com/intellij/openapi/components/impl/ApplicationStoreTest.java
platform/platform-tests/testSrc/com/intellij/openapi/components/impl/StateStorageManagerImplTest.java
platform/platform-tests/testSrc/com/intellij/openapi/components/impl/XmlElementStorageTest.java
platform/platform-tests/testSrc/com/intellij/openapi/keymap/impl/ModifierKeyDoubleClickHandlerTest.java
platform/platform-tests/testSrc/com/intellij/openapi/vfs/impl/http/HttpVirtualFileTest.java
platform/platform-tests/testSrc/com/intellij/search/SearchableOptionsTest.java
platform/testFramework/src/com/intellij/testFramework/LightPlatformLangTestCase.java

index 3cd9dbcddfab9fa6b9dccf3688566a8e44b819ed..cb15694b6c6339c6d4f37380488858191b0d18b6 100644 (file)
@@ -18,7 +18,6 @@ package com.intellij.openapi.vfs;
 import com.intellij.openapi.util.SystemInfo;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.vfs.impl.jrt.JrtFileSystem;
-import com.intellij.testFramework.IdeaTestCase;
 import com.intellij.testFramework.LightPlatformTestCase;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -38,7 +37,6 @@ public class JrtFileSystemTest {
     assumeTrue("skipped: java=" + SystemInfo.JAVA_VERSION, JrtFileSystem.isSupported());
     assumeTrue("skipped: JDK_19=" + ourJdkHome, ourJdkHome != null && JrtFileSystem.isModularJdk(ourJdkHome));
 
-    IdeaTestCase.initPlatformPrefix();
     LightPlatformTestCase.initApplication();
   }
 
index 718bf64ca2c5ea2bd0b73bc28c6193f1298a1dfa..bd9d86ad0d8425e2a91074c8b8a24cc7f07c4a96 100644 (file)
@@ -24,7 +24,7 @@ import com.intellij.psi.TokenType;
 import com.intellij.psi.impl.DebugUtil;
 import com.intellij.psi.impl.source.tree.ASTStructure;
 import com.intellij.psi.tree.*;
-import com.intellij.testFramework.LightPlatformLangTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
 import com.intellij.testFramework.PlatformTestUtil;
 import com.intellij.util.ThreeState;
 import com.intellij.util.diff.DiffTree;
@@ -36,7 +36,7 @@ import org.jetbrains.annotations.NotNull;
 
 import java.util.List;
 
-public class PsiBuilderQuickTest extends LightPlatformLangTestCase {
+public class PsiBuilderQuickTest extends LightPlatformTestCase {
   private static final IFileElementType ROOT = new IFileElementType("ROOT", Language.ANY);
 
   private static final IElementType LETTER = new IElementType("LETTER", Language.ANY);
index f5e846fd2c8ee104a55e001543bfddea50ee7b00..b1ad87ad66685893fbbd434a91c1baa0f509e633 100644 (file)
@@ -23,7 +23,7 @@ import com.intellij.openapi.components.impl.stores.*;
 import com.intellij.openapi.util.Disposer;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.vfs.CharsetToolkit;
-import com.intellij.testFramework.LightPlatformLangTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
 import com.intellij.util.messages.MessageBus;
 import com.intellij.util.xmlb.XmlSerializerUtil;
 import gnu.trove.THashMap;
@@ -40,7 +40,7 @@ import java.util.Map;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.MatcherAssert.assertThat;
 
-public class ApplicationStoreTest extends LightPlatformLangTestCase {
+public class ApplicationStoreTest extends LightPlatformTestCase {
   private File testAppConfig;
   private MyComponentStore componentStore;
 
@@ -86,11 +86,13 @@ public class ApplicationStoreTest extends LightPlatformLangTestCase {
     component.foo = "newValue";
     StoreUtil.save(componentStore, null);
 
-    assertThat(streamProvider.data.get(RoamingType.PER_USER).get(StoragePathMacros.APP_CONFIG + "/proxy.settings.xml"), equalTo("<application>\n" +
-                                                                                                                                "  <component name=\"HttpConfigurable\">\n" +
-                                                                                                                                "    <option name=\"foo\" value=\"newValue\" />\n" +
-                                                                                                                                "  </component>\n" +
-                                                                                                                                "</application>"));
+    assertThat(
+      streamProvider.data.get(RoamingType.PER_USER).get(StoragePathMacros.APP_CONFIG + "/proxy.settings.xml"),
+      equalTo("<application>\n" +
+              "  <component name=\"HttpConfigurable\">\n" +
+              "    <option name=\"foo\" value=\"newValue\" />\n" +
+              "  </component>\n" +
+              "</application>"));
   }
 
   public void testLoadFromStreamProvider() throws Exception {
index 62dda2957d12778af7b72f59a92bba4778bd8cea..9e0beb723bb77052324e95131a80df5812f97f0f 100644 (file)
@@ -20,7 +20,7 @@ import com.intellij.openapi.components.*;
 import com.intellij.openapi.components.impl.stores.StateStorageManagerImpl;
 import com.intellij.openapi.components.impl.stores.StorageData;
 import com.intellij.openapi.util.Disposer;
-import com.intellij.testFramework.LightPlatformLangTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertThat;
 /**
  * @author mike
  */
-public class StateStorageManagerImplTest extends LightPlatformLangTestCase {
+public class StateStorageManagerImplTest extends LightPlatformTestCase {
   private StateStorageManagerImpl myStateStorageManager;
 
   @Override
index 0fafc897cdadbf4d7fe57e911b7800fe3249cf91..00136101070353c377b22dfe3a9e3def57df3d8a 100644 (file)
@@ -22,7 +22,7 @@ import com.intellij.openapi.components.TrackingPathMacroSubstitutor;
 import com.intellij.openapi.components.impl.stores.StorageData;
 import com.intellij.openapi.components.impl.stores.XmlElementStorage;
 import com.intellij.openapi.util.Disposer;
-import com.intellij.testFramework.LightPlatformLangTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
 import org.jdom.Element;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -37,7 +37,7 @@ import static com.intellij.openapi.util.JDOMBuilder.tag;
 /**
  * @author mike
  */
-public class XmlElementStorageTest extends LightPlatformLangTestCase {
+public class XmlElementStorageTest extends LightPlatformTestCase {
   private Disposable myParentDisposable;
 
   @Override
index 54a2865ad44404ed63ae90209972f0442a12d238..1bae25a39db810d68c6b5488df8cfc37e85c0c62 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2014 JetBrains s.r.o.
+ * Copyright 2000-2015 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,13 +22,13 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.actionSystem.KeyboardShortcut;
 import com.intellij.openapi.keymap.KeymapManager;
 import com.intellij.openapi.util.Clock;
-import com.intellij.testFramework.LightPlatformLangTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
 
 import javax.swing.*;
 import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 
-public class ModifierKeyDoubleClickHandlerTest extends LightPlatformLangTestCase {
+public class ModifierKeyDoubleClickHandlerTest extends LightPlatformTestCase {
   private static final String MY_SHIFT_SHIFT_ACTION = "ModifierKeyDoubleClickHandlerTest.action1";
   private static final String MY_SHIFT_KEY_ACTION = "ModifierKeyDoubleClickHandlerTest.action2";
   private static final String MY_SHIFT_SHIFT_KEY_ACTION = "ModifierKeyDoubleClickHandlerTest.action3";
index baa7850f99e468a763366a34fcd83e8823a39910..a57ecc8a6061d7a00131e508aacb0864478f7ef1 100644 (file)
@@ -18,12 +18,12 @@ package com.intellij.openapi.vfs.impl.http;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.openapi.vfs.VirtualFileManager;
 import com.intellij.psi.PsiManager;
-import com.intellij.testFramework.PlatformTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
 
-public class HttpVirtualFileTest extends PlatformTestCase {
-  public void testPsiFileForRoot() throws Exception {
+public class HttpVirtualFileTest extends LightPlatformTestCase {
+  public void testPsiFileForRoot() {
     VirtualFile file = VirtualFileManager.getInstance().findFileByUrl("http://www.jetbrains.com/");
     assertNotNull(file);
-    assertNotNull(PsiManager.getInstance(myProject).findFile(file));
+    assertNotNull(PsiManager.getInstance(getProject()).findFile(file));
   }
 }
\ No newline at end of file
index 61c97d6de07ab9f39784720e326c3882da515925..b2847f8a278fc476419435b7a1d779a3a6d03c64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2015 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,19 +21,19 @@ import com.intellij.ide.ui.search.SearchableOptionsRegistrar;
 import com.intellij.openapi.options.Configurable;
 import com.intellij.openapi.options.ConfigurableGroup;
 import com.intellij.openapi.options.ex.ProjectConfigurablesGroup;
-import com.intellij.testFramework.LightPlatformLangTestCase;
+import com.intellij.testFramework.LightPlatformTestCase;
 
 import javax.swing.event.DocumentEvent;
 import java.util.Set;
 
 /**
- * User: anna
+ * @author anna
  */
-public class SearchableOptionsTest extends LightPlatformLangTestCase {
-  public void testFindCodeTemplates() throws Exception {
-    final ConfigurableHit configurables =
-      SearchableOptionsRegistrar.getInstance().getConfigurables(new ConfigurableGroup[]{new ProjectConfigurablesGroup(getProject())}, DocumentEvent.EventType.INSERT, null, "method", getProject());
-    final Set<Configurable> configurableSet = configurables.getAll();
+public class SearchableOptionsTest extends LightPlatformTestCase {
+  public void testFindCodeTemplates() {
+    ConfigurableGroup[] groups = {new ProjectConfigurablesGroup(getProject())};
+    ConfigurableHit configurables = SearchableOptionsRegistrar.getInstance().getConfigurables(groups, DocumentEvent.EventType.INSERT, null, "method", getProject());
+    Set<Configurable> configurableSet = configurables.getAll();
     for (Configurable configurable : configurableSet) {
       if (configurable.getDisplayName().equals(new AllFileTemplatesConfigurable(getProject()).getDisplayName())) {
         return;
index e74eb9482ee3ecaf231923aebc3d97b33a73e958..9c85ad6108c1874c3a1ba56c579f3d4695b9c312 100644 (file)
@@ -15,8 +15,9 @@
  */
 package com.intellij.testFramework;
 
+/** @deprecated platform autodetection should work well enough, just use base class instead (to be removed in IDEA 16) */
+@SuppressWarnings("ALL")
 public abstract class LightPlatformLangTestCase extends LightPlatformTestCase {
-  @SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
   protected LightPlatformLangTestCase() {
     PlatformTestCase.autodetectPlatformPrefix();
   }