Skip to content

Commit

Permalink
Remove all references to Scala and original pprint (they were just th…
Browse files Browse the repository at this point in the history
…ere for testing)
  • Loading branch information
deusaquilus committed Dec 29, 2023
1 parent dc617ea commit 2d13501
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ repositories {

dependencies {
testImplementation("io.kotest:kotest-runner-junit5:5.8.0")
implementation("com.lihaoyi:fansi_2.13:0.4.0")
implementation("com.lihaoyi:pprint_2.13:0.8.1")
implementation(kotlin("reflect"))
}

Expand Down
5 changes: 3 additions & 2 deletions src/main/kotlin/io/exoquery/pprint/Walker.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package io.exoquery.pprint

import io.exoquery.fansi.Attrs
import scala.collection.mutable.TreeMap
import java.util.*
import kotlin.collections.LinkedHashMap
import kotlin.reflect.full.allSuperclasses

/**
Expand Down Expand Up @@ -86,7 +87,7 @@ abstract class Walker {
if (showGenericForCollections) {
val superTypes = x::class.allSuperclasses.toSet()
when {
(TreeMap::class in superTypes) -> "TreeMap"
(SortedMap::class in superTypes) -> "SortedMap"
(LinkedHashMap::class in superTypes) -> "LinkedHashMap"
else -> "Map"
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/io/exoquery/pprint/HorizontalTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class HorizontalTests : FunSpec({
test("SortedMap") { Check(
sortedMapOf("key" to "v", "key2" to "v2"),
"""Map("key" -> "v", "key2" -> "v2")""",
"""TreeMap("key" -> "v", "key2" -> "v2")"""
"""SortedMap("key" -> "v", "key2" -> "v2")"""
) }
}

Expand Down

0 comments on commit 2d13501

Please sign in to comment.