Skip to content

Commit 949a8d7

Browse files
committed
Test toDataFrame conversion of inheriting class
1 parent 1b3bf1d commit 949a8d7

File tree

1 file changed

+14
-0
lines changed
  • tests/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api

1 file changed

+14
-0
lines changed

tests/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api/toDataFrame.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,18 @@ class CreateDataFrameTests {
183183
col[IncompatibleVersionErrorData<*>::actual].type() shouldBe typeOf<Any>()
184184
col[IncompatibleVersionErrorData<*>::expected].type() shouldBe typeOf<Any>()
185185
}
186+
187+
interface Named {
188+
val name: String get() = "default impl"
189+
}
190+
191+
class Data(override val name: String) : Named
192+
193+
@Test
194+
fun simpleInheritance() {
195+
val name = "temp"
196+
val df = listOf(Data(name)).toDataFrame(maxDepth = 1)
197+
198+
df["name"][0] shouldBe name
199+
}
186200
}

0 commit comments

Comments
 (0)