Skip to content

Commit 2dbfd2d

Browse files
authored
Off-by-one in the error message for a VCR key mismatch. (#526)
2 parents d7eb290 + b4f0da1 commit 2dbfd2d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

jvm/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1111
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1212

1313
## [Unreleased]
14+
### Fixed
15+
- Off-by-one in the error message for a VCR key mismatch. ([#526](https://github.com/diffplug/selfie/pull/526))
1416

1517
## [2.5.1] - 2025-03-04
1618
### Fixed

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
@@ -111,7 +111,7 @@ internal constructor(
111111
val expected = state.frames[currentFrame]
112112
if (expected.first != key) {
113113
throw fs.assertFailed(
114-
mode.msgVcrMismatch("$sub[$OPEN${currentFrame}$CLOSE]", expected.first, key, call),
114+
mode.msgVcrMismatch("$sub[$OPEN${currentFrame+1}$CLOSE]", expected.first, key, call),
115115
expected.first,
116116
key)
117117
}

0 commit comments

Comments
 (0)