Skip to content

Commit

Permalink
more graphics class tests
Browse files Browse the repository at this point in the history
- added graphics.Canvas, graphics.Font, graphics.Image, graphics.Quad, graphics.Shader and graphics.Text
- removed rogue resource img
- removed event wait test placeholder
- updated todo list
  • Loading branch information
ellraiser committed Nov 15, 2023
1 parent af4c50a commit ad44eb4
Show file tree
Hide file tree
Showing 16 changed files with 646 additions and 359 deletions.
2 changes: 1 addition & 1 deletion testing/examples/lovetest_runAllTests.html

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions testing/examples/lovetest_runAllTests.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<!-- PASSED 275 || FAILED 2 || SKIPPED 28 || TIME 16.781 -->
<!-- PASSED 281 || FAILED 2 || SKIPPED 20 || TIME 13.278 -->

**305** tests were completed in **16.781s** with **275** passed, **2** failed, and **28** skipped
**303** tests were completed in **13.278s** with **281** passed, **2** failed, and **20** skipped

### Report
| Module | Pass | Fail | Skip | Time |
| --------------------- | ------ | ------ | ------- | ------ |
| 🔴 audio | 27 | 1 | 0 | 4.898s |
| 🟢 data | 12 | 0 | 0 | 0.213s |
| 🟢 event | 4 | 0 | 2 | 0.103s |
| 🟢 filesystem | 29 | 0 | 2 | 0.561s |
| 🔴 font | 6 | 1 | 0 | 0.123s |
| 🟢 graphics | 93 | 0 | 14 | 2.106s |
| 🟢 image | 5 | 0 | 0 | 0.088s |
| 🟢 math | 20 | 0 | 0 | 0.284s |
| 🟢 physics | 22 | 0 | 6 | 0.059s |
| 🟢 sound | 4 | 0 | 0 | 0.015s |
| 🟢 system | 6 | 0 | 2 | 0.023s |
| 🟢 thread | 5 | 0 | 0 | 0.318s |
| 🟢 timer | 6 | 0 | 0 | 2.020s |
| 🟢 video | 2 | 0 | 0 | 0.016s |
| 🟢 window | 34 | 0 | 2 | 5.954s |
| 🟢 audio | 28 | 0 | 0 | 0.851s |
| 🟢 data | 12 | 0 | 0 | 0.197s |
| 🟢 event | 4 | 0 | 2 | 0.096s |
| 🟢 filesystem | 29 | 0 | 2 | 0.539s |
| 🔴 font | 6 | 1 | 0 | 0.121s |
| 🔴 graphics | 98 | 1 | 6 | 2.029s |
| 🟢 image | 5 | 0 | 0 | 0.087s |
| 🟢 math | 20 | 0 | 0 | 0.321s |
| 🟢 physics | 22 | 0 | 6 | 0.468s |
| 🟢 sound | 4 | 0 | 0 | 0.068s |
| 🟢 system | 6 | 0 | 2 | 0.148s |
| 🟢 thread | 5 | 0 | 0 | 0.376s |
| 🟢 timer | 6 | 0 | 0 | 2.082s |
| 🟢 video | 2 | 0 | 0 | 0.039s |
| 🟢 window | 34 | 0 | 2 | 5.855s |


### Failures
> 🔴 Source
> assert 53 [check effect was applied] expected 'true' got 'false'
> 🔴 GlyphData
> assert 8 [check glyph number] expected '97' got '0'
> 🔴 Canvas
> assert 44 [check depth sample mode set] expected 'equal' got 'nil'
572 changes: 280 additions & 292 deletions testing/examples/lovetest_runAllTests.xml

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified testing/output/expected/love.test.graphics.setColorMask-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 13 additions & 17 deletions testing/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ This is the status of all module tests currently.
| ----------------- | ---- | ---- | ---- |
| 🟢 audio | 28 | 0 | 0 |
| 🟢 data | 12 | 0 | 0 |
| 🟡 event | 4 | 1 | 1 |
| 🟢 filesystem | 28 | 0 | 2 |
| 🟢 event | 4 | 0 | 2 |
| 🟢 filesystem | 29 | 0 | 2 |
| 🟢 font | 7 | 0 | 0 |
| 🟡 graphics | 93 | 14 | 1 |
| 🟡 graphics | 99 | 5 | 1 |
| 🟢 image | 5 | 0 | 0 |
| 🟢 math | 20 | 0 | 0 |
| 🟡 physics | 22 | 6 | 0 |
Expand Down Expand Up @@ -113,24 +113,20 @@ For sanity-checking, if it's currently not covered or it's not possible to test
Things still left to do:
- [ ] physics.Body, physics.Contact, physics.Fixture,
physics.Joint, physics.Shape, physics.World
- [ ] graphics.Canvas, graphics.Font, graphics.Image, graphics.Mesh,
graphics.ParticleSystem, graphics.Quad, graphics.Shader,
graphics.SpriteBatch, graphics.Text, graphics.Texture, graphics.Video
- [ ] event.wait
- [ ] graphics.present
- [ ] graphics.drawInstanced
- [ ] graphics.setDepthMode (needs actual graphical comparison if possible)
- [ ] graphics.setFrontFaceWinding (needs actual graphical comparison if possible)
- [ ] graphics.setMeshCullMode (needs actual graphical comparison if possible)
- [ ] @deprecated setStencilTest (use setStencilMode)
- [ ] @deprecated physics methods (sasha changes)
- [ ] check 12.0 wiki page for new methods
- [ ] need a platform: format table somewhere for compressed formats (i.e. DXT not supported)
- [ ] ideally graphics.isCompressed should have an example of all compressed files love can take
- [ ] graphics.Mesh, graphics.ParticleSystem
graphics.SpriteBatch, graphics.Video
- [ ] graphics.drawInstanced
- [ ] @deprecated love.graphics.stencil (replaced by love.graphics.setStencilMode)
- [ ] @deprecated love.graphics.setStencilTest (replaced by love.graphics.setStencilMode)

---

## Future Goals
- [ ] Tests can compare visual results to a reference image (partially done)
- [ ] graphics.isCompressed should have an example of all compressed files love can take
- [ ] Tests can compare visual results to a reference image
This is partially done as we already save actual images for graphics tests to
use in the report output comparisons, so we just need to add a helper method
to the test class to let you just do assertMatching on the imgdata
- [ ] Ability to test loading different combinations of modules
- [ ] Performance tests
Binary file added testing/resources/font-letters-ab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testing/resources/font-letters-cd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion testing/tests/event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ end
-- love.event.wait
-- @NOTE not sure best way to test this one
love.test.event.wait = function(test)
test:skipTest('test class needs writing')
test:skipTest('used internally')
end
Loading

0 comments on commit ad44eb4

Please sign in to comment.