mirror of
https://github.com/chylex/IntelliJ-Rainbow-Brackets.git
synced 2025-04-15 05:15:43 +02:00
Fix missing @Test annotations
This commit is contained in:
parent
882c5d0eae
commit
4cab3548c3
src/test/kotlin/com/github/izhangzhihao/rainbow/brackets
@ -4,8 +4,11 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import com.jetbrains.lang.dart.DartFileType
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowDartTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun testRainbowForDart() {
|
||||
val code =
|
||||
"""
|
||||
@ -50,4 +53,4 @@ void main() {
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,11 @@ import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.jetbrains.plugins.groovy.GroovyFileType
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowGroovyTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun testRainbowForGroovy() {
|
||||
@Language("Groovy") val code =
|
||||
"""
|
||||
@ -57,4 +59,4 @@ Map<String, Map<String, String>> convertObjectsToMapProperties(Map<String, Objec
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,13 +9,16 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowJavaScriptTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun testJavaScriptPluginEnabled() {
|
||||
assertTrue(PluginManagerCore.getPlugin(PluginId.getId("JavaScript"))?.isEnabled!!)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue11() {
|
||||
@Language("JavaScript") val code = """
|
||||
"use strict";
|
||||
@ -41,6 +44,7 @@ const moment = require('moment')
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue12() {
|
||||
@Language("JavaScript") val code = """
|
||||
"use strict";
|
||||
@ -64,6 +68,7 @@ console.log(a == b)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue21() {
|
||||
|
||||
@Language("JavaScript") val code = "open (\$" + "{f})\n" + "open (\$" + "{f} )"
|
||||
@ -85,6 +90,7 @@ console.log(a == b)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue23() {
|
||||
@Language("JavaScript") val code = """
|
||||
"use strict";
|
||||
@ -131,6 +137,7 @@ if ((a.field_detail && a.is) ||
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue38() {
|
||||
@Language("JavaScript") val code = """
|
||||
const element = ( <div> <h1>Hello, world!</h1> </div> );
|
||||
@ -162,6 +169,7 @@ const element = ( <div> <h1>Hello, world!</h1> </div> );
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `for somehow, it just don't work "testIssue39"`() {
|
||||
@Language("JavaScript") val code = """
|
||||
const html = '<div><div><div>Hello</div></div></div>'
|
||||
@ -193,6 +201,7 @@ const element = ( <div> <h1>Hello, world!</h1> </div> );
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue31() {
|
||||
@Language("JavaScript") val code = """
|
||||
"use strict";
|
||||
@ -223,6 +232,7 @@ const element = ( <div> <h1>Hello, world!</h1> </div> );
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue427() {
|
||||
@Language("TypeScript") val code = """let example: Array<Map<string,string>>;""".trimIndent()
|
||||
|
||||
@ -244,4 +254,4 @@ const element = ( <div> <h1>Hello, world!</h1> </div> );
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowJavaTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
override fun tearDown() {
|
||||
@ -22,6 +23,7 @@ class RainbowJavaTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
rainbowSettings.languageBlacklist = setOf()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowForJava() {
|
||||
@Language("Java") val code =
|
||||
"""
|
||||
@ -60,6 +62,7 @@ public class Test<T> {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDisableRainbowForJava() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isRainbowEnabled = false
|
||||
@ -83,6 +86,7 @@ public class Test<T> {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDisableRainbowAngleBracketsForJava() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isEnableRainbowAngleBrackets = false
|
||||
@ -121,6 +125,7 @@ public class Test<T> {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDisableRainbowRoundBracketsForJava() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isEnableRainbowRoundBrackets = false
|
||||
@ -151,6 +156,7 @@ public class Test<T> {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDisableRainbowSquigglyBracketsForJava() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isEnableRainbowSquigglyBrackets = false
|
||||
@ -187,6 +193,7 @@ public class Test<T> {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDoNOTRainbowifyBracketsWithoutContentForJava() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isDoNOTRainbowifyBracketsWithoutContent = true
|
||||
@ -223,6 +230,7 @@ public class Test<T> {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDoNOTRainbowifyBracketsWhenJavaInBlacklist() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isDoNOTRainbowifyBracketsWithoutContent = true
|
||||
@ -246,6 +254,7 @@ public class Test<T> {
|
||||
.shouldBe(0)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testIssue391() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.cycleCountOnAllBrackets = true
|
||||
@ -289,4 +298,4 @@ public class Test {
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,11 @@ import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.jetbrains.kotlin.idea.KotlinFileType
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowKotlinTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun testRainbowForKotlin() {
|
||||
@Language("kotlin") val code =
|
||||
"""
|
||||
@ -64,6 +67,7 @@ fun <T> filter(l: List<T>, f: (T) -> Boolean): MutableList<T> {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowArrowForKotlin() {
|
||||
@Language("kotlin") val code =
|
||||
"""
|
||||
@ -125,6 +129,7 @@ val a: (Int) -> Unit = { aa ->
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `ForSomeHowTheTestNotPassed "testRainbowLabelForKotlin"`() {
|
||||
@Language("kotlin") val code =
|
||||
"""
|
||||
@ -160,6 +165,7 @@ class AA {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKotlinFunctionLiteralBracesAndArrow() {
|
||||
@Language("kotlin") val code =
|
||||
"""
|
||||
@ -191,4 +197,4 @@ fun t() {
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,11 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import com.jetbrains.php.lang.PhpFileType
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowPHPTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun testRainbowForPHP() {
|
||||
val code =
|
||||
"""
|
||||
@ -52,4 +55,4 @@ function padZero(string data): string
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,14 +6,16 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.jetbrains.plugins.ruby.ruby.lang.RubyFileType
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowRubyTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun testRubyPluginEnabled() {
|
||||
assertTrue(PluginManagerCore.getPlugin(PluginId.getId("org.jetbrains.plugins.ruby"))?.isEnabled!!)
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
fun testRainbowForIssue53Part0() {
|
||||
val code =
|
||||
"""
|
||||
@ -38,6 +40,7 @@ end
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowForIssue53Part1() {
|
||||
val code =
|
||||
"""
|
||||
@ -58,6 +61,7 @@ foobar(p1: "", p2: false, p3: 1)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowForIssue53Part2() {
|
||||
val code =
|
||||
"""
|
||||
@ -93,6 +97,7 @@ end
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowForIssue53Part3() {
|
||||
val code =
|
||||
"""
|
||||
@ -125,6 +130,7 @@ end
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowForIssue53Part4() {
|
||||
val code =
|
||||
"""
|
||||
@ -152,4 +158,4 @@ end
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.jetbrains.plugins.scala.ScalaFileType
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowScalaTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@ -20,6 +21,7 @@ class RainbowScalaTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
rainbowSettings.isDoNOTRainbowifyBracketsWithoutContent = false
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowForScala() {
|
||||
@Language("Scala") val code =
|
||||
"""
|
||||
@ -60,6 +62,7 @@ import scala.annotation.tailrec
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDisableRainbowSquareBracketsForScala() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isEnableRainbowSquareBrackets = false
|
||||
@ -97,4 +100,4 @@ import scala.annotation.tailrec
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,11 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import io.kotest.matchers.shouldBe
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.junit.Test
|
||||
|
||||
class RainbowXMLTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun `disabled for non-determinist results of testRainbowTagNameForXML`() {
|
||||
@Language("XML") val code =
|
||||
"""
|
||||
@ -83,6 +86,7 @@ class RainbowXMLTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testRainbowForXML() {
|
||||
@Language("XML") val code =
|
||||
"""
|
||||
|
@ -5,9 +5,11 @@ import com.intellij.ide.highlighter.JavaFileType
|
||||
import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase
|
||||
import org.intellij.lang.annotations.Language
|
||||
import org.junit.Test
|
||||
|
||||
class RandomColorGenTest : LightJavaCodeInsightFixtureTestCase() {
|
||||
|
||||
@Test
|
||||
fun testRandomColorGenWorks() {
|
||||
val rainbowSettings = RainbowSettings.instance
|
||||
rainbowSettings.isRainbowEnabled = true
|
||||
|
Loading…
Reference in New Issue
Block a user