MarkusAmshove / Kluent

Fluent Assertion-Library for Kotlin
MIT License
867 stars 64 forks source link

Android Studio Iguana doesn't show "Show diff" when assert fails #228

Open croccio opened 7 months ago

croccio commented 7 months ago

It appears this was already raised couple of time: #177, #200

The new format used by Kluent's assertEquals (that is, "Expected <$expected>, actual <$actual>.") is not picked up by Android Studio Iguana to provide the useful "show difference"

croccio commented 7 months ago

adding testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersionOverride") doesn't fix the issue

cristan commented 1 week ago

Unit test to test this:

@Test
fun test_equal_lists() {
    val listA = listOf(1590026561, 1590026579, 1590026590, 1590026597,
        1590026608, 1590026619, 1590026639, 1590026648)
    val listB = listOf(1590026561, 1590026579, 1590026590, 1590026597,
        1590026608, 1590026619, 1590028639, 1590026648)
    listA shouldBeEqualTo listB
}

Both org.junit.Assert.assertEquals(listA, listB) as well as kotlin.test.assertEquals(listA, listB) (with the kotlin-test-junit dependency) do work. I am using Android Studio Ladybug.

For me, that is a dealbreaker. I guess I'll have to find a new library, which is unfortunate because there are so many already, which makes it hard to pick one.