Commit Graph

80 Commits

Author SHA1 Message Date
Sasha Szpakowski 112270ba19 tests: fix pixel coordinate test using too low precision in opengl es 2024-03-23 00:19:47 -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 7f6ac772ef update test styling 2024-03-22 15:16:54 +00: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
ell 71f379e268 update isOS method 2024-03-20 09:49:18 +00:00
ell 7f4adc0ffe small update
changed tests so that all assert failures are logged rather than just the first assert that failed, added isOS() to the test method class to be used in tests directly, updated test readme on a couple bits and added newTexture basic check
2024-03-19 18:05:06 +00:00
Sasha Szpakowski 89f43ff48d tests: compare screenshot test output to a reference image, on desktops. 2024-03-16 23:11:14 -03:00
Miku AuahDark 6f86c195bc Test: Remove leftover love.sensor.getData calls when testing love.sensor.getName. 2024-03-16 20:47:17 +08:00
Miku AuahDark 50295fdb8a Test: Add tests for love.sensors. 2024-03-16 15:11:21 +08:00
Sasha Szpakowski a07503c3f5 rename test parameters to be simpler.
--runAllTests is now --all
--runSpecificMethod is now --method
--runSpecificModules is now --modules
2024-03-10 15:41:31 -03:00
Sasha Szpakowski 99af5765fc tests: don't skip love.graphics.isActive test on vulkan 2024-03-07 21:00:45 -04:00
ell c4fd14c4fd handle missing expected img for compareImg() 2024-03-06 09:41:57 +00:00
ellraiser ea215ad31c Merge branch 'love2d:main' into main 2024-03-06 09:19:02 +00: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 026e9f164a tests: add a few more shader uniform tests 2024-03-05 21:01:05 -04:00
ell c7e7565a3c indentation 2024-02-29 17:49:24 +00:00
ell 23bd9110dd add callback variant for love.graphics.captureScreenshot 2024-02-29 09:54:49 +00:00
ell 3dfa13e60c requested changes 2024-02-29 09:20:18 +00:00
ell 7cc3816bec finish physics module coverage
- love.physics.World:rayCastAny()
- love.physics.World:rayCastClosest()
- love.physics.World:getShapesInArea()
- love.physics.Body:getShapes()
- love.physics.Body:getShape()
- love.physics.Body:hasCustomMassData()
2024-02-28 18:38:43 +00:00
ell 990259edf9 more tests
- added custom error handler so that love is closed if a crash occurs rather than hang on the graphic screen (for runner crashes mainly)

- updated missing functions left todo in todo.md and removed list from readme.md to make it easier to keep track of

- added love.audio.getPlaybackDevice(), love.audio.getPlaybackDevices(), love.audio.setPlaybackDevice()

- added love.data.ByteData:setString()

- added love.filesystem.getFullCommonPath(), love.filesystem.mountFullPath(), love.filesystem.unmountFullPath(), love.filesystem.moundCommonPath(), plus optional b/t/bt params to love.filesystem.load()

- added love.keyboard.isModifierActive()

- added love.sound.SoundData:copy() and love.sound.SoundData:slice()

- added love.graphics.Texture:isCanvas() and love.graphics.Texture:isComputeWritable()

- added love.image.ImageData:isLinear(), love.image.ImageData:setLinear(), and love.image.ImageData:encode("*.exr")

- added love.image.CompressedImageData:isLinear() and love.image.CompressedImageData:setLinear()

- added love.system.getPreferredLocales()

- added love.window.focus() and removed love.window.close() (now deprecated)
2024-02-28 17:49:51 +00:00
Sasha Szpakowski ff06718f8a opengl: only populate Shader:getWarnings string when there are warnings. 2024-02-27 23:17:24 -04:00
Sasha Szpakowski 57fab45c2c tests: draw points at the center instead of corner of pixels. 2024-02-27 22:54:37 -04:00
EngineerSmith f00a86dc9f Added change to changes.txt 2024-02-09 01:15:45 +00:00
EngineerSmith 666fd88631 Altered tests to account for additional container argument in love.data.hash 2024-02-09 00:55:57 +00:00
Sasha Szpakowski fffb835358 tests: fix love.graphics.setDepthMode test 2024-01-06 15:36:50 -04: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
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 cb4cb80595 tests: fix love.math.randomNormal test consistency
also test exact values to make sure the tests cover algorithm changes
2023-12-23 23:07:31 +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 b7e576efa8 tests: add some tolerance to video rewind test
It happens while the video is still playing, so the tell() query after the rewind isn't guaranteed to be 0.
2023-12-13 21:05:12 -04:00
Sasha Szpakowski a6ae0ae10d tests: more tolerance for sleep overshooting its time
CI machines can take a while doing some other thing during a sleep.
2023-12-12 20:16:51 -04:00
Sasha Szpakowski e6af895b01 tests: video play/pause time test waits for less time 2023-12-12 19:55:38 -04:00
Sasha Szpakowski 6715bae0c3 tests: add waitSeconds method 2023-12-12 19:53:56 -04:00
Sasha Szpakowski 1f38b77bab tests: sleep for a shorter time in getTime test 2023-12-12 19:53:38 -04:00
Sasha Szpakowski e413f0c033 tests: sleep for a shorter time 2023-12-12 19:38:39 -04:00
Sasha Szpakowski 4b9f4f77e9 tests: fix invalid effect volumes.
OpenAL prints an error when they're out of range.
2023-12-12 19:36:47 -04:00
ell eda26b3574 Update joystick.lua 2023-12-10 21:41:50 +00:00
ell 6a2ba9322e tweaks for hardware tests 2023-12-05 10:26:24 +00:00
ell 2875a96e92 test updates
- update main love readme to include note on tests
- added module tests for Sensor, Keyboard, Touch, Joystick, Mouse, and Love (for hooks + basic love-level methods)
- general clean-up of main class logic
- couple fixes for runner-specific failures (physics.Joint, audio.getActiveSourceCount, mouse.getPosition)
- change window.close test to run last
2023-12-04 16:13:38 +00:00
ell cc4b618a42 Update physics.lua 2023-11-23 13:57:07 +00:00
ell d6c779643f fix some ranges for runners 2023-11-23 13:17:09 +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