Add test for enum highlighting
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package testing
|
||||
|
||||
<info textAttributesKey="KOTLIN_BUILTIN_ANNOTATION">enum</info> class <info textAttributesKey="KOTLIN_CLASS">Test</info> {
|
||||
<info textAttributesKey="KOTLIN_CLASS">FIRST</info>
|
||||
<info textAttributesKey="KOTLIN_CLASS">SECOND</info>
|
||||
}
|
||||
|
||||
fun <info textAttributesKey="KOTLIN_FUNCTION_DECLARATION">testing</info>(<info textAttributesKey="KOTLIN_PARAMETER">t1</info>: <info textAttributesKey="KOTLIN_CLASS">Test</info>, <info textAttributesKey="KOTLIN_PARAMETER">t2</info>: <info textAttributesKey="KOTLIN_CLASS">Test</info>): <info textAttributesKey="KOTLIN_CLASS">Test</info> {
|
||||
if (<info textAttributesKey="KOTLIN_PARAMETER">t1</info> != <info textAttributesKey="KOTLIN_PARAMETER">t2</info>) return <info textAttributesKey="KOTLIN_CLASS">Test</info>.<info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">FIRST</info>
|
||||
return <info textAttributesKey="KOTLIN_NAMESPACE_FUNCTION_CALL"><info textAttributesKey="KOTLIN_FUNCTION_CALL">testing</info></info>(<info textAttributesKey="KOTLIN_CLASS">Test</info>.<info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">FIRST</info>, <info textAttributesKey="KOTLIN_CLASS">Test</info>.<info textAttributesKey="KOTLIN_INSTANCE_PROPERTY">SECOND</info>)
|
||||
}
|
||||
@@ -36,7 +36,12 @@ public class HighlightingTestGenerated extends AbstractHighlightingTest {
|
||||
public void testAllFilesPresentInHighlighter() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/highlighter"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
|
||||
@TestMetadata("Enums.kt")
|
||||
public void testEnums() throws Exception {
|
||||
doTest("idea/testData/highlighter/Enums.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Functions.kt")
|
||||
public void testFunctions() throws Exception {
|
||||
doTest("idea/testData/highlighter/Functions.kt");
|
||||
|
||||
Reference in New Issue
Block a user