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
This commit is contained in:
ell
2023-12-04 16:13:38 +00:00
parent 8951635abc
commit 2875a96e92
19 changed files with 2917 additions and 381 deletions
+2 -2
View File
@@ -307,10 +307,10 @@ love.test.physics.Joint = function(test)
test:assertFalse(joint:isDestroyed(), 'check not destroyed')
-- check reaction props (sometimes nil on linux runners)
if joint:getReactionForce(1) ~= nil then
if joint:getReactionForce(1) ~= nil and joint:getReactionForce(1) ~= 0/0 then
test:assertEquals(0, joint:getReactionForce(1), 'check reaction force')
end
if joint:getReactionTorque(1) ~= nil then
if joint:getReactionTorque(1) ~= nil and joint:getReactionTorque(1) ~= 0/0 then
test:assertEquals(0, joint:getReactionTorque(1), 'check reaction torque')
end