Commit Graph

26 Commits

Author SHA1 Message Date
Sasha Szpakowski 9b5851e039 Move current love.graphics.setStencilMode functionality to setStencilState.
Add new higher level love.graphics.setStencilMode function.
- Add love.graphics.setStencilMode(mode [, value = 1])
- Add love.graphics.setStencilMode().
- Add mode, value = love.graphics.getStencilMode().

The possible modes are "off" (same as no parameters), "draw", and "test".
The "draw" mode disables color writes and sets the stencil state to ("replace", "always") using the given value.
The "test" mode enables color writes and sets the stencil state to ("keep", "equal") using the given value to compare to.
2024-01-04 16:23:49 -04:00
Sasha Szpakowski d7e0856dc6 tests: add basic graphics Buffer tests.
issue #1986
2023-12-31 16:06:45 -04:00
Sasha Szpakowski dbcdbc47d5 Add debugname field to shader options table. 2023-12-29 16:51:24 +01:00
Sasha Szpakowski 0be5a214dd tests: remove invalid parameter in readbackTexture calls. 2023-12-14 18:39:22 -04:00
Sasha Szpakowski cb24af7cc2 tests: add texture debug name check 2023-12-13 21:47:42 -04:00
Sasha Szpakowski e6af895b01 tests: video play/pause time test waits for less time 2023-12-12 19:55:38 -04:00
ell 6a2ba9322e tweaks for hardware tests 2023-12-05 10:26:24 +00:00
ell f846d4ab91 review changes
- spaced out object class tests and added more defined comment groups

- changed reusing vars in case it causes unexpected asserts in future

- fixed some shape:point test having wrong params

- added assertTrue + assertFalse for basic checks

- used assertRange more for some of the physics + audio tests
2023-11-23 12:52:54 +00:00
ell 825e46621e finished obj tests
- added physics.Contact, physics.Body, and physics.Shape obj tests
- added graphics.Mesh and graphics.ParticleSystem obj tests
- fixed some rgba tolerance needed on a couple methods
- added test conclusion to zip artifact name for quick checking on PRs
- ignored testsuite on compat mode windows builds
2023-11-20 20:05:30 +00:00
ell 89119c554a add runner exceptions to readme 2023-11-17 12:19:56 +00:00
ell a8c714bc89 change to exact rgba comparison for visual tests 2023-11-17 00:11:32 +00:00
ell d1307584e5 add graphics pixel comparison tests
- added an automatic check for expected vs actual with the images already shown in the report - used a 1px tolerance for now for each of the pixels checked
2023-11-16 23:28:50 +00:00
ell 37961f92d6 floor joint pos 2023-11-16 22:09:31 +00:00
ell 8124804d49 more graphics + some physics tests
- added obj tests for graphics.SpriteBatch, and graphics.Video
- added obj tests for physics.World
- added test for setStencilMode and removed deprecated stencil+setStencilTest
- added graphics.drawInstanced
- fixed deprecated physic shape calls (body now added as first param)
2023-11-16 19:22:40 +00:00
ell 1323bb1452 ignore setMipmapFilter on opengl ES 2023-11-15 20:34:34 +00:00
ell 0ef417f60c fix test.graphics.Canvas 2023-11-15 19:54:14 +00:00
ell 038b36a67d add renderer to report md 2023-11-15 19:52:17 +00:00
ell ad44eb4fd7 more graphics class tests
- 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
2023-11-15 19:32:39 +00:00
ell 137126656a update ci run 2023-11-14 13:00:09 +00:00
ell 658c75b5c3 latest from love-test 2023-11-14 09:47:36 +00:00
ell 09d0ace4b6 finished a bunch of modules
- finished audio module
- finished data module
- finished filesystem module
- finished font module (note: glphy test fails, but seems to be a 12.0 issue)
- finished image module
- finished maths module
- finished sound module
- finished thread module
- finished video module
- fixed pcall error not showing in results for invalid test code
2023-10-14 18:18:53 +01:00
ell f477b8085f finish graphics module + HTML image comparison
- added mostly all graphics draw tests
- added a basic set of "expected" images (generated from successful tests)
- HTML output now shows the expected vs actual generated images for each of the graphics tests applicable
2023-10-09 22:32:41 +01:00
ell c7c8f25284 added objects module placeholders 2023-10-08 18:25:00 +01:00
ell e1948f6e57 added all graphics 'state' tests 2023-10-08 17:12:07 +01:00
ell e03b2db08b 0.2
- Added tests for all obj creation, transformation, window + system info graphics methods
- Added half the state methods for graphics + added placeholders for missing drawing methods
- Added TestMethod:assertNotNil() for quick nil checking
- Added time total to the end of each module summary in console log to match file output

- Removed a bunch of unessecary nil checks
- Removed :release() from test methods, collectgarbage("collect") is called between methods instead

- Renamed /output to /examples to avoid confusion

- Replaced love.filesystem.newFile with love.filesystem.openFile
- Replaced love.math.noise with love.math.perlinNoise / love.math.simplexNoise

- Fixed newGearJoint throwing an error in 12 as body needs to be dynamic not static now

- Some general cleanup, incl. better comments and time format in file output
2023-10-05 23:03:32 +01:00
ell 19df8040df 0.1
Initial commit of a basic test framework, see readme.md for more

Most modules are covered with basic unit tests, and there's an example test for a graphics draw (rectangle) and object (File) - for object tests doing more scenario based so we can check multiple things together
2023-10-04 14:43:44 +01:00