@@ -146,7 +146,9 @@ class BinarySelfie(actual: Snapshot, disk: DiskStorage, private val onlyFacet: S
146
146
return actualBytes
147
147
} else {
148
148
throw Selfie .system.fs.assertFailed(
149
- Selfie .system.mode.msgSnapshotMismatch(), expected, actualBytes)
149
+ Selfie .system.mode.msgSnapshotMismatchBinary(expected, actualBytes),
150
+ expected,
151
+ actualBytes)
150
152
}
151
153
}
152
154
}
@@ -241,7 +243,9 @@ private fun <T : Any> toBeDidntMatch(expected: T?, actual: T, format: LiteralFor
241
243
throw Selfie .system.fs.assertFailed(" Can't call `toBe_TODO` in ${Mode .readonly} mode!" )
242
244
} else {
243
245
throw Selfie .system.fs.assertFailed(
244
- Selfie .system.mode.msgSnapshotMismatch(), expected, actual)
246
+ Selfie .system.mode.msgSnapshotMismatch(expected.toString(), actual.toString()),
247
+ expected,
248
+ actual)
245
249
}
246
250
}
247
251
}
@@ -263,10 +267,12 @@ private fun assertEqual(expected: Snapshot?, actual: Snapshot, storage: Snapshot
263
267
.filter { expected.subjectOrFacetMaybe(it) != actual.subjectOrFacetMaybe(it) }
264
268
.toList()
265
269
.sorted()
270
+ val expectedFacets = serializeOnlyFacets(expected, mismatchedKeys)
271
+ val actualFacets = serializeOnlyFacets(actual, mismatchedKeys)
266
272
throw storage.fs.assertFailed(
267
- storage.mode.msgSnapshotMismatch(),
268
- serializeOnlyFacets(expected, mismatchedKeys) ,
269
- serializeOnlyFacets(actual, mismatchedKeys) )
273
+ storage.mode.msgSnapshotMismatch(expectedFacets, actualFacets ),
274
+ expectedFacets ,
275
+ actualFacets )
270
276
}
271
277
}
272
278
}
0 commit comments