23 Commits

Author SHA1 Message Date
MartinCornelius 3094e20150 tests(graphics): add resetProjection test 2026-04-30 20:25:40 +02:00
Sasha Szpakowski 8f8260afa5 add a test for auto-generated canvas mipmaps 2024-04-14 11:29:46 -03:00
Sasha Szpakowski 93c26ed25a add a graphics test for some shader IO variables 2024-04-12 17:31:21 -03:00
Sasha Szpakowski dc945d757a tests: add a graphics test for uniform vec3 array alignment 2024-04-01 23:01:00 -03:00
Sasha Szpakowski 339c1acde8 Merge pull request #2043 from ellraiser/main
testsuite updates
2024-03-22 22:02:35 -03:00
Sasha Szpakowski f1d350703a tests: another attempt at fixing the shader pixel coordinate test 2024-03-22 19:55:17 -03:00
ell 24d84418c7 testsuite updates
- added some additional checks to check for lua version/jit enabled for use with other repos (namely love potion)
- updated HTML report CSS to group each image compare and fix pixel rendering
- fixed not showing image checks for the 4th compareImg or more in a given test method
- fixed pixel tolerance usage crashing when looking at images on the boundary
- fixed compare img not checking the first 2 rows of pixels on the x + y
-graphic tests that fail will now show a third "difference" image to help identify what isn't matching up
2024-03-22 12:17:15 +00:00
Sasha Szpakowski 6bd08f1d93 attempt to fix graphics tests on CI 2024-03-21 22:46:42 -03:00
Sasha Szpakowski 36aa55fb84 tests: add graphics tests for y direction in canvases 2024-03-21 22:10:24 -03:00
Sasha Szpakowski 6002a03761 tests: add a test to make sure the front face is correct 2024-03-21 18:12:44 -03:00
Sasha Szpakowski 89f43ff48d tests: compare screenshot test output to a reference image, on desktops. 2024-03-16 23:11:14 -03:00
ell 81599fed93 small update
- removed assertPixels()
- added exportImg() to help graphics test writing (sets the "expected" image for the test)
- added "deflate" variants to love.data.compress()
2024-03-06 09:18:44 +00:00
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
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 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 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 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 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 04293d3fbd use love-test-report action
added md support to work with love-test-report, a basic action made to just dump md files into repo checks
2023-10-06 13:26:51 +01:00
ell db600b7fb6 output to src 2023-10-06 00:08:39 +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