mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[properties] add PropertiesCodeInsightSanityTest
This commit is contained in:
@@ -121,6 +121,7 @@ com.siyeh.*
|
||||
[COMMUNITY_EXPLORATORY_TESTS]
|
||||
com.intellij.java.propertyBased.JavaCodeInsightSanityTest
|
||||
com.intellij.java.propertyBased.JavaPsiIndexConsistencyTest
|
||||
com.intellij.lang.properties.propertyBased.PropertiesCodeInsightSanityTest
|
||||
|
||||
[GROOVY_TESTS]
|
||||
org.jetbrains.plugins.groovy.*
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.lang.properties.propertyBased;
|
||||
|
||||
import com.intellij.lang.properties.PropertiesFileType;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.testFramework.SkipSlowTestLocally;
|
||||
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
|
||||
import com.intellij.testFramework.propertyBased.CheckHighlighterConsistency;
|
||||
import com.intellij.testFramework.propertyBased.MadTestingAction;
|
||||
import com.intellij.testFramework.propertyBased.MadTestingUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jetCheck.Generator;
|
||||
import org.jetbrains.jetCheck.PropertyChecker;
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@SkipSlowTestLocally
|
||||
public class PropertiesCodeInsightSanityTest extends LightCodeInsightFixtureTestCase {
|
||||
|
||||
public void testIncrementalHighlighterUpdate() {
|
||||
PropertyChecker.checkScenarios(actionsOnPropertiesFiles(CheckHighlighterConsistency.randomEditsWithHighlighterChecks));
|
||||
}
|
||||
|
||||
public void testReparse() {
|
||||
PropertyChecker.checkScenarios(actionsOnPropertiesFiles(MadTestingUtil::randomEditsWithReparseChecks));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private Supplier<MadTestingAction> actionsOnPropertiesFiles(Function<PsiFile, Generator<? extends MadTestingAction>> fileActions) {
|
||||
return MadTestingUtil.actionsOnFileContents(myFixture, PathManager.getHomePath(),
|
||||
f -> f.getName().endsWith(PropertiesFileType.DOT_DEFAULT_EXTENSION), fileActions);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user