Closed claremacrae closed 3 years ago
Version: v.8.4.0
This isn't a problem with approvaltests, it's a failing in the custom writer you created. As such I think it is a bad idea to try to systemically fix this unless it is shown to be a common problem.
Pairing with a user today, we had some really confusing behaviour where some output .png files were identical, according to BeyondCompare, but the default ApprovalTests.cpp comparator said that they were different.
It turned out that the Juce library .png writer appended to any pre-existing .png file, rather than over-writing it... So once there was a failure, in each successive test run, ApprovalTests just appended more data to the received file, which just kept getting larger and larger!
Should we delete the received file, if it exists at the start of a verify() call?
Are there any situations where this could break existing code?