Add test for correct frame buffer output #119
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new test to check that the frame buffer is actually generating the correct frames using the existing Croom.nes ROM. Some files will load and generate "frames" and a "frame rate" but will become stuck at the initial screen (a black border and grey box). This test helps to detect this issue (originally reported as #113)
This also fixes the file loading in the test cases to use
binary
instead ofascii
encoding which causes the problem.The test works by checking the first index of a certain color pixel (white) on the first 6 frames of output. Croom only uses 2 colors on the initial screen which makes it easy to detect. Comparing full snapshots of each frame takes too long.