Skip to content

Commit

Permalink
fixed pivot test regarding types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolanrensen committed Oct 11, 2023
1 parent 2bc098f commit 6be5e1a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ internal fun renderType(type: KType?): String {
type.classifier in listOf(LocalDateTime::class, LocalTime::class) ->
fullName.removePrefix("java.time.")

fullName.startsWith("kotlin.collections") ->
fullName.removePrefix("kotlin.collections")
fullName.startsWith("kotlin.collections.") ->
fullName.removePrefix("kotlin.collections.")

fullName.startsWith("kotlin.") ->
fullName.removePrefix("kotlin.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class PivotTests {

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

res.renderToString(columnTypes = true, title = true) shouldBe
defaultExpected.group { drop(1) }.into("key").renderToString(columnTypes = true, title = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ internal fun renderType(type: KType?): String {
type.classifier in listOf(LocalDateTime::class, LocalTime::class) ->
fullName.removePrefix("java.time.")

fullName.startsWith("kotlin.collections") ->
fullName.removePrefix("kotlin.collections")
fullName.startsWith("kotlin.collections.") ->
fullName.removePrefix("kotlin.collections.")

fullName.startsWith("kotlin.") ->
fullName.removePrefix("kotlin.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class PivotTests {

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

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

0 comments on commit 6be5e1a

Please sign in to comment.