File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/api Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class ConstructorsTests {
38
38
@Suppress(" ktlint:standard:argument-list-wrapping" )
39
39
@Test
40
40
fun `dataFrameOf with local class` () {
41
+ // issue #928
41
42
data class Car (val type : String , val model : String )
42
43
43
44
val cars: DataFrame <* > = dataFrameOf(" owner" , " car" )(
@@ -50,5 +51,13 @@ class ConstructorsTests {
50
51
val unfolded = cars.unfold(" car" )
51
52
unfolded[" car" ][" type" ].type shouldBe typeOf<String >()
52
53
unfolded[" car" ][" model" ].type shouldBe typeOf<String >()
54
+
55
+ val cars2 = listOf (
56
+ Car (" audi" , " a8" ),
57
+ Car (" toyota" , " corolla" ),
58
+ ).toDataFrame()
59
+
60
+ cars2[" type" ].type shouldBe typeOf<String >()
61
+ cars2[" model" ].type shouldBe typeOf<String >()
53
62
}
54
63
}
You can’t perform that action at this time.
0 commit comments