Minor, capitalize language feature names in tests
To simplify textual search across the codebase
This commit is contained in:
+3
-4
@@ -60,11 +60,10 @@ The directive lets you compose a test consisting of several files in one actual
|
||||
### 4. LANGUAGE
|
||||
|
||||
This directive lets you enable or disable certain language features. Language features are named as
|
||||
parameters of the primary constructor of the class LanguageFeatureSettings. Each feature can be
|
||||
enabled with `+` or disabled with `-`.
|
||||
enum entries of the class LanguageFeature. Each feature can be enabled with `+` or disabled with `-`.
|
||||
|
||||
#### Usage:
|
||||
|
||||
// !LANGUAGE: -topLevelSealedInheritance
|
||||
// !LANGUAGE: -TopLevelSealedInheritance
|
||||
|
||||
// !LANGUAGE: +typeAliases -localDelegatedProperties
|
||||
// !LANGUAGE: +TypeAliases -LocalDelegatedProperties
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: -topLevelSealedInheritance
|
||||
// !LANGUAGE: -TopLevelSealedInheritance
|
||||
|
||||
sealed class Base
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.intellij.lang.java.JavaLanguage;
|
||||
import com.intellij.openapi.util.Condition;
|
||||
import com.intellij.openapi.util.Conditions;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.PsiFileFactory;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
@@ -175,7 +174,7 @@ public abstract class BaseDiagnosticsTest
|
||||
do {
|
||||
boolean enable = matcher.group(1).equals("+");
|
||||
String name = matcher.group(2);
|
||||
LanguageFeature feature = LanguageFeature.fromString(StringUtil.capitalize(name));
|
||||
LanguageFeature feature = LanguageFeature.fromString(name);
|
||||
if (feature == null) {
|
||||
Assert.fail(
|
||||
"Language feature not found, please check spelling: " + name + "\n" +
|
||||
|
||||
Reference in New Issue
Block a user