mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Explain how to overwrite golden data in extractor test failure message
This info is already in the javadoc of FakeExtractorOutput#assertOutput but it's not super discoverable if you just see the test failure. I was manually copying the dump results around before realising there was a mechanism to auto-update. PiperOrigin-RevId: 296204463
This commit is contained in:
parent
7a10f2bff3
commit
113c418884
1 changed files with 8 additions and 1 deletions
|
|
@ -129,7 +129,14 @@ public final class FakeExtractorOutput implements ExtractorOutput, Dumper.Dumpab
|
|||
|
||||
if (DUMP_FILE_ACTION == COMPARE_WITH_EXISTING) {
|
||||
String expected = TestUtil.getString(context, dumpFile);
|
||||
assertWithMessage(dumpFile).that(actual).isEqualTo(expected);
|
||||
assertWithMessage(
|
||||
"Extractor output doesn't match golden file: %s\n"
|
||||
+ "To update the golden, change FakeExtractorOutput#DUMP_FILE_ACTION to"
|
||||
+ " WRITE_TO_LOCAL (for Robolectric tests) or WRITE_TO_DEVICE (for"
|
||||
+ " instrumentation tests) and re-run the test.",
|
||||
dumpFile)
|
||||
.that(actual)
|
||||
.isEqualTo(expected);
|
||||
} else {
|
||||
File file =
|
||||
DUMP_FILE_ACTION == WRITE_TO_LOCAL
|
||||
|
|
|
|||
Loading…
Reference in a new issue