Skip to content

Commit 87bcf54

Browse files
committed
added language highlighting to all CodeGenerationTests.kt
1 parent 2bf037a commit 87bcf54

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

dataframe-jupyter/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/CodeGenerationTests.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@file:Suppress("LocalVariableName")
2-
31
package org.jetbrains.kotlinx.dataframe.jupyter
42

53
import org.intellij.lang.annotations.Language
@@ -56,7 +54,8 @@ class CodeGenerationTests : DataFrameJupyterTest() {
5654

5755
@Test
5856
fun `interface without body compiled correctly`() {
59-
"""
57+
@Language("kts")
58+
val a = """
6059
val a = dataFrameOf("a")(1, 2, 3)
6160
val b = dataFrameOf("b")(1, 2, 3)
6261
val ab = dataFrameOf("a", "b")(1, 2)
@@ -66,26 +65,27 @@ class CodeGenerationTests : DataFrameJupyterTest() {
6665

6766
@Test
6867
fun `nested schema with isOpen = false is ignored in marker generation`() {
69-
"""
70-
val df = dataFrameOf("col" to listOf("a"), "leaf" to listOf(dataFrameOf("a", "b")(1, 2).first()))
71-
val df1 = df.convert { leaf }.asFrame { it.add("c") { 3 } }
72-
df1.leaf.c
68+
@Language("kts")
69+
val a = """
70+
val df = dataFrameOf("col" to listOf("a"), "leaf" to listOf(dataFrameOf("a", "b")(1, 2).first()))
71+
val df1 = df.convert { leaf }.asFrame { it.add("c") { 3 } }
72+
df1.leaf.c
7373
""".checkCompilation()
7474
}
7575

7676
// Issue #1222
7777
@Test
7878
fun `do not reuse marker with non-matching sub-schema`() {
79-
@Language("kt")
80-
val _1 = """
79+
@Language("kts")
80+
val a = """
8181
val df1 = dataFrameOf("group" to columnOf("a" to columnOf(1, null, 3)))
8282
val df2 = dataFrameOf("group" to columnOf("a" to columnOf(1, 2, 3)))
8383
df1.group.a
8484
df2.group.a
8585
""".checkCompilation()
8686

87-
@Language("kt")
88-
val _2 = """
87+
@Language("kts")
88+
val b = """
8989
val df1 = dataFrameOf("group" to columnOf("a" to columnOf(1, 2, 3)))
9090
val df2 = dataFrameOf("group" to columnOf("a" to columnOf(1, null, 3)))
9191
df1.group.a

0 commit comments

Comments
 (0)