Skip to content

Commit

Permalink
fix Any? assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetuska committed Oct 13, 2021
1 parent 8795caa commit 90ed60b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 0.2.2
## Versions
* Kotlin: `1.5.31`
* Gradle: `7.2.0`
* JDK: `11`
## Changes
* Fix assertion functions to properly compare `Any?::toString()` representations
* Bump kotlin version to `1.5.31`

# 0.2.1
## Versions
* Kotlin: `1.5.30`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ JS that still defaults to legacy compiler).
The current version was built using the following tooling versions and is guaranteed to work with this setup. Given the
experimental nature of kotlin compiler plugin API, the plugin powering this library is likely to stop working on
projects using newer/older kotlin versions.
* Kotlin: `1.5.30`
* Kotlin: `1.5.31`
* Gradle: `7.2.0`
* JDK: `11`

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginManagement {
mavenCentral()
}
plugins {
id("de.fayard.refreshVersions") version "0.20.0"
id("de.fayard.refreshVersions") version "0.23.0"
}
}

Expand Down
5 changes: 3 additions & 2 deletions library/klip-api/src/commonMain/kotlin/assertKlip.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import kotlin.test.assertEquals
@Klippable
public fun assertMatchesKlip(actual: Any?, _context: KlipContext? = null) {
_context.validate()
val klip = KlipManager.klip(_context) { actual.toString() }
assertEquals(klip, actual, "Value does not match its klip")
val actualStr = actual.toString()
val klip = KlipManager.klip(_context) { actualStr }
assertEquals(klip, actualStr, "Value does not match its klip")
}

/**
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ pluginManagement {
}

plugins {
id("de.fayard.refreshVersions") version "0.21.0"
id("com.gradle.enterprise") version "3.6.4"
id("de.fayard.refreshVersions") version "0.23.0"
id("com.gradle.enterprise") version "3.7"
}

rootProject.name = "klip"
Expand Down
12 changes: 6 additions & 6 deletions versions.properties
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#### Dependencies and Plugin versions with their available updates.
#### Generated by `./gradlew refreshVersions` version 0.20.0
#### Generated by `./gradlew refreshVersions` version 0.21.0
####
#### Don't manually edit or split the comments that start with four hashtags (####),
#### they will be overwritten by refreshVersions.
####
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file
plugin.android=4.2.0
plugin.android=4.2.2
#======================================= Plugins ========================================
plugin.com.gradle.plugin-publish=0.15.0
plugin.com.gradle.plugin-publish=0.16.0
plugin.com.github.jakemarsden.git-hooks=0.0.2
plugin.org.jlleitschuh.gradle.ktlint=10.1.0
version.org.jlleitschuh.gradle..ktlint-gradle=10.2.0
version.org.jetbrains.dokka..dokka-gradle-plugin=1.5.0
version.org.jetbrains.dokka..dokka-gradle-plugin=1.5.31
version.com.github.gmazzo..gradle-buildconfig-plugin=3.0.3
version.io.github.gradle-nexus..publish-plugin=1.1.0
version.kotest=5.0.0.5
version.ktlint=0.42.1
#====================================== Libraries =======================================
version.com.github.tschuchortdev..kotlin-compile-testing=1.4.4
version.com.github.tschuchortdev..kotlin-compile-testing=1.4.5
version.com.google.auto.service..auto-service=1.0
version.com.google.auto.service..auto-service-annotations=1.0
version.kotlin=1.5.30
version.kotlin=1.5.31
version.kotlinx.coroutines=1.5.1

0 comments on commit 90ed60b

Please sign in to comment.