java: dedicated text blocks test

make tests on preview features disconnected from language level to make them evolve easily

GitOrigin-RevId: b92e4d8eeb4b7ef71e5fedd18c06fbe213e9dc9e
This commit is contained in:
Anna Kozlova
2019-06-19 21:53:11 +02:00
committed by intellij-monorepo-bot
parent 89fa4186d6
commit d02e7ed0b1
3 changed files with 4 additions and 4 deletions

View File

@@ -4,20 +4,20 @@ package com.intellij.java.codeInsight.daemon
import com.intellij.JavaTestUtil
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
class LightJava13HighlightingTest : LightJavaCodeInsightFixtureTestCase() {
class JavaTextBlocksHighlightingTest : LightJavaCodeInsightFixtureTestCase() {
override fun getProjectDescriptor() = JAVA_13
override fun getBasePath() = JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/daemonCodeAnalyzer/advHighlighting13"
override fun getBasePath() = "${JavaTestUtil.getRelativeJavaTestDataPath()}/codeInsight/daemonCodeAnalyzer/textBlocks"
fun testTextBlocks() = doTest()
fun testUnclosedTextBlock() = doTest()
fun testTextBlockOpeningSpaces() {
myFixture.configureByText(getTestName(false) + ".java", "class C {\n String spaces = \"\"\" \t \u000C \n \"\"\";\n}")
myFixture.configureByText("${getTestName(false)}.java", "class C {\n String spaces = \"\"\" \t \u000C \n \"\"\";\n}")
myFixture.checkHighlighting()
}
private fun doTest() {
myFixture.configureByFile(getTestName(false) + ".java")
myFixture.configureByFile("${getTestName(false)}.java")
myFixture.checkHighlighting()
}
}