Skip to content

Commit 7dc03aa

Browse files
committed
Give VCR its own "msgSnapshotNotFound" message.
1 parent 819fa1e commit 7dc03aa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/Mode.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ enum class Mode {
4747
msg("Snapshot " + SnapshotNotEqualErrorMsg.forUnequalStrings(expected, actual))
4848
internal fun msgSnapshotMismatchBinary(expected: ByteArray, actual: ByteArray) =
4949
msgSnapshotMismatch(expected.toQuotedPrintable(), actual.toQuotedPrintable())
50+
internal fun msgVcrSnapshotNotFound() = msg("VCR snapshot not found")
5051
internal fun msgVcrMismatch(key: String, expected: String, actual: String) =
5152
msg("VCR frame $key " + SnapshotNotEqualErrorMsg.forUnequalStrings(expected, actual))
5253
internal fun msgVcrUnread(expected: Int, actual: Int) =

jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internal constructor(
4545
if (state.readMode) {
4646
val snapshot =
4747
disk.readDisk(sub, call)
48-
?: throw Selfie.system.fs.assertFailed(Selfie.system.mode.msgSnapshotNotFound())
48+
?: throw Selfie.system.fs.assertFailed(Selfie.system.mode.msgVcrSnapshotNotFound())
4949
var idx = 1
5050
for ((key, value) in snapshot.facets) {
5151
check(key.startsWith(OPEN))

0 commit comments

Comments
 (0)