Skip to content

Commit e0c7265

Browse files
committed
Turns out we need TestLocator still.
1 parent 78db66d commit e0c7265

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ object Selfie {
9696
*/
9797
@JvmStatic
9898
@ExperimentalSelfieVcr
99-
fun vcrSelfie(sub: String = "") = VcrSelfie(sub, deferredDiskStorage)
99+
fun vcrTestLocator(sub: String = "") = VcrSelfie.TestLocator(sub, deferredDiskStorage)
100100
}
101101

102102
@RequiresOptIn(

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ private const val CLOSE = "»"
2828
class VcrSelfie
2929
internal constructor(
3030
private val sub: String,
31+
private val call: CallStack,
3132
private val disk: DiskStorage,
3233
) : AutoCloseable {
33-
private val call: CallStack = recordCall(false)
34+
class TestLocator internal constructor(private val sub: String, private val disk: DiskStorage) {
35+
private val call = recordCall(false)
36+
fun createVcr() = VcrSelfie(sub, call, disk)
37+
}
3438
private val state: State
3539

3640
internal sealed class State {

0 commit comments

Comments
 (0)