Closed Pixdigit closed 5 years ago
Hi @Pixdigit, I couldn't find a test called TestZSpace. I checked out the sprite-refactor
branch and applied the patch but I couldn't find any function matching that name.
Ok, my bad. I didnt know git diff --patch didnt actually patch in new files. Then just create a file zSpace_test.go with this in it.
Please for now ignore all the comments as I am currently working on a refactor so I wanted to have the smallest broken code. Also since the code was copied from NewEmptyFame() so the error messages arent too accurate for TestZSpace()
Hi @Pixdigit, sorry but what was the error that you encountered? It seems like the test passed for me.
The exact error is:
zSpace_test.go:14: could not copy pixel buffer into frame: Invalid renderer
Which is returned after a call to screenRenderer.CreateTexture
The test fails with --short
but passes with --short --run="TestZSpace"
After hours of searching through the code I found the error. Dont ask why since I dont know myself. But in one test I called sdl.Quit()
for some reason. Of course that would lead to an invalid renderer. Still wonder why I did that and why I didnt notice that much sooner.
Thank you for your time.
Are there any operations that cause a renderer to become invalid? Because I have a test that succeeds when run in isolation but fails when run together with the other tests. Since almost all tests involve the renderer I cannot isolate a test that causes the renderer to become invalid. If you want to check out the error run the code here and apply this patch. The failing test is TestZSpace