mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java-highlighting] Test extra semicolons highlighting in JDK 21
IJ-CR-110702 GitOrigin-RevId: c477953def6dd7c26f0b46755afabe98161e08dc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
89cfc1c9fc
commit
e668728d78
+6
@@ -0,0 +1,6 @@
|
||||
package foo;
|
||||
|
||||
import java.util.List;
|
||||
;
|
||||
|
||||
class Foo {}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package foo;
|
||||
|
||||
<error descr="Extra semicolons between import statements are not allowed">;</error>
|
||||
import java.util.List;
|
||||
|
||||
class Foo {}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package foo;
|
||||
|
||||
import java.util.List;
|
||||
<error descr="Extra semicolons between import statements are not allowed">;</error>
|
||||
import java.util.Date;
|
||||
|
||||
class Foo {}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package foo;
|
||||
|
||||
;
|
||||
|
||||
class Foo {}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.java.codeInsight.daemon
|
||||
|
||||
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase
|
||||
import com.intellij.pom.java.LanguageLevel
|
||||
|
||||
class SemicolonHighlightingTest: LightDaemonAnalyzerTestCase() {
|
||||
private val BASE_PATH = "/codeInsight/daemonCodeAnalyzer/semicolonHighlighting"
|
||||
|
||||
@Throws(Exception::class)
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
setLanguageLevel(LanguageLevel.JDK_21)
|
||||
}
|
||||
|
||||
private fun doTest() {
|
||||
doTest(BASE_PATH + "/" + getTestName(false) + ".java", false, false)
|
||||
}
|
||||
|
||||
fun testSemicolonAfterImport() { doTest() }
|
||||
fun testSemicolonBeforeImport() { doTest() }
|
||||
fun testSemicolonBetweenImport() { doTest() }
|
||||
fun testSemicolonWithoutImport() { doTest() }
|
||||
}
|
||||
Reference in New Issue
Block a user