Skip to content

Commit 0c45d92

Browse files
author
ntwigg
committed
Update our tight test.
1 parent 9351c9e commit 0c45d92

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

jvm/selfie-lib/src/commonTest/kotlin/com/diffplug/selfie/SelfieImplementationsTest.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
package com.diffplug.selfie
1717

18-
import io.kotest.assertions.throwables.shouldThrow
1918
import io.kotest.matchers.shouldBe
2019
import kotlin.test.Test
2120

@@ -24,10 +23,8 @@ class SelfieImplementationsTest {
2423
fun issue_529() {
2524
val empty = Snapshot.of("")
2625
val emptyPlusFacet = Snapshot.of("").plusFacet("new-facet", "new-facet-value")
27-
val exception =
28-
shouldThrow<StringIndexOutOfBoundsException> {
29-
serializeOnlyFacets(empty, listOf("new-facet"))
30-
}
31-
exception.message shouldBe "String index out of range: -1"
26+
val mismathedKeys = listOf("new-facet")
27+
serializeOnlyFacets(empty, mismathedKeys) shouldBe ""
28+
serializeOnlyFacets(emptyPlusFacet, mismathedKeys) shouldBe "╔═ [new-facet] ═╗\nnew-facet-value"
3229
}
3330
}

0 commit comments

Comments
 (0)