Skip to content

Commit 6be5e1a

Browse files
committed
fixed pivot test regarding types
1 parent 2bc098f commit 6be5e1a

File tree

4 files changed

+6
-6
lines changed
  • core
    • generated-sources/src
      • main/kotlin/org/jetbrains/kotlinx/dataframe/impl
      • test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person
    • src
      • main/kotlin/org/jetbrains/kotlinx/dataframe/impl
      • test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person

4 files changed

+6
-6
lines changed

core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Rendering.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ internal fun renderType(type: KType?): String {
6363
type.classifier in listOf(LocalDateTime::class, LocalTime::class) ->
6464
fullName.removePrefix("java.time.")
6565

66-
fullName.startsWith("kotlin.collections") ->
67-
fullName.removePrefix("kotlin.collections")
66+
fullName.startsWith("kotlin.collections.") ->
67+
fullName.removePrefix("kotlin.collections.")
6868

6969
fullName.startsWith("kotlin.") ->
7070
fullName.removePrefix("kotlin.")

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/PivotTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class PivotTests {
9595

9696
data["age"].type() shouldBe typeOf<List<Int>>()
9797
data["city"].type() shouldBe typeOf<String>()
98-
data["weight"].type() shouldBe typeOf<Comparable<Any>>()
98+
data["weight"].type() shouldBe typeOf<Comparable<*>>() // Comparable<String + Int> -> Comparable<Nothing | *>
9999

100100
res.renderToString(columnTypes = true, title = true) shouldBe
101101
defaultExpected.group { drop(1) }.into("key").renderToString(columnTypes = true, title = true)

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/Rendering.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ internal fun renderType(type: KType?): String {
6363
type.classifier in listOf(LocalDateTime::class, LocalTime::class) ->
6464
fullName.removePrefix("java.time.")
6565

66-
fullName.startsWith("kotlin.collections") ->
67-
fullName.removePrefix("kotlin.collections")
66+
fullName.startsWith("kotlin.collections.") ->
67+
fullName.removePrefix("kotlin.collections.")
6868

6969
fullName.startsWith("kotlin.") ->
7070
fullName.removePrefix("kotlin.")

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/PivotTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class PivotTests {
9595

9696
data["age"].type() shouldBe typeOf<List<Int>>()
9797
data["city"].type() shouldBe typeOf<String>()
98-
data["weight"].type() shouldBe typeOf<Comparable<Any>>()
98+
data["weight"].type() shouldBe typeOf<Comparable<*>>() // Comparable<String + Int> -> Comparable<Nothing | *>
9999

100100
res.renderToString(columnTypes = true, title = true) shouldBe
101101
defaultExpected.group { drop(1) }.into("key").renderToString(columnTypes = true, title = true)

0 commit comments

Comments
 (0)