Hackily fix compile errors in the tests. #37
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.
I'm not quite sure how to run the tests, but some things I probably did wrong:
AudioClip
toAudioAPI::play
. The original test set up a backgroundtrack; pretty sure
AudioAPI::play
doesn't quite do that.TestState::init
, aWorld
reference isstolen from a
unique_ptr
. There's an API mismatch whereincreateWorld
returns aunique_ptr<World>
, butStatsView::setWorld
wants an unmanaged pointer(and doesn't take ownership of it). Stealing the pointer (via
unique_ptr::release
/unique_ptr::reset
) is terrible, but I'm not surehow the ownership semantics should work.
SpritePainter::add
was0
; thiscauses the sprite to never be drawn (via
SpritePainter::draw
; thegetMask() & mask
check fails). I'm not entirely sure what the mask does,but setting it to 1 makes something (albeit incorrect) renders. I think
the assets might be out-of-date? But the animation frames don't look
like they have the right texture coordinates.
I believe this fixes #32