Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/add char to platformstable types #3536

Merged

Conversation

hughlunnon
Copy link
Contributor

issue documented here - #3533 -

the block in kotest-common/src/commonMain/kotlin/io/kotest/mpp/stable.kt

   String::class,
   Int::class,
   Long::class,
   Double::class,
   Float::class,
   Byte::class,
   Short::class,
   Boolean::class,
   Pair::class,
   Triple::class,
)

missed "Char", which means the code

    context("test something") {
        data class TestData(val input: String?, val expected: Char)
        withData(
            TestData("US", 'Y'),
            TestData("UK", 'N'),
            TestData(null, 'N'),
        ) { (input, expected) ->
           doSomething(input) shouldBe expected
        }
    }

gives lots of warnings like

Warning, type class kotlin.Char used in data testing does not have a stable toString()

char was previously being detected as "unstable", is now correctly identified as stable

@sksamuel sksamuel merged commit 2661fd2 into kotest:master May 29, 2023
19 checks passed
@Kantis Kantis added this to the 5.7 milestone Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants