@Override protected void setUp() throws Exception { super.setUp(); String root = JavaTestUtil.getJavaTestDataPath() + "/psi/repositoryUse/modifyAnnotations"; PsiTestUtil.removeAllRoots(myModule, IdeaTestUtil.getMockJdk17("mock 1.5")); PsiTestUtil.createTestProjectStructure(myProject, myModule, root, myFilesToDelete); }
@Override protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) throws Exception { moduleBuilder.setLanguageLevel(LanguageLevel.JDK_1_8); moduleBuilder.addLibraryJars( "guava-17.0.jar", PathManager.getHomePath().replace(File.separatorChar, '/') + "/community/lib/", "guava-17.0.jar"); moduleBuilder.addLibraryJars( "guava-17.0.jar-2", PathManager.getHomePath().replace(File.separatorChar, '/') + "/lib/", "guava-17.0.jar"); moduleBuilder.addJdk(IdeaTestUtil.getMockJdk18Path().getPath()); }
protected static Sdk createJdk(String versionName) { return IdeaTestUtil.getMockJdk17(versionName); }
private void doTest(boolean warnings) { IdeaTestUtil.setTestVersion(JavaSdkVersion.JDK_1_8, getModule(), getTestRootDisposable()); doTest(BASE_PATH + "/" + getTestName(false) + ".java", warnings, false); }
public void testUnicodeGrapheme() { doTest("<error descr=\"Illegal/unsupported escape sequence\">\\X</error>"); IdeaTestUtil.setTestVersion( JavaSdkVersion.JDK_1_9, myFixture.getModule(), getTestRootDisposable()); doTest("\\X"); }
public void testBoundaries() { doTest("\\b <error descr=\"Unsupported boundary\">\\b{g}</error> \\B \\A \\z \\Z \\G"); IdeaTestUtil.setTestVersion( JavaSdkVersion.JDK_1_9, myFixture.getModule(), getTestRootDisposable()); doTest("\\b \\b{g} \\B \\A \\z \\Z \\G"); }
@Override protected Sdk getProjectJDK() { return IdeaTestUtil.getMockJdk18(); }
@Override protected void setUp() throws Exception { super.setUp(); ModuleRootModificationUtil.setModuleSdk(myModule, IdeaTestUtil.getMockJdk18()); myFixture.enableInspections(myInspection); }