mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
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:
@@ -0,0 +1,19 @@
|
||||
-- love.sensor
|
||||
-- @NOTE we can't test this module fully as it's hardware dependent
|
||||
-- however we can test methods do what is expected and can handle certain params
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
------------------------------------METHODS-------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
-- love.sensor.hasSensor
|
||||
love.test.sensor.hasSensor = function(test)
|
||||
-- but we can make sure that the SensorTypes can be passed
|
||||
local accelerometer = love.sensor.hasSensor('accelerometer')
|
||||
local gyroscope = love.sensor.hasSensor('gyroscope')
|
||||
test:assertNotNil(accelerometer)
|
||||
test:assertNotNil(gyroscope)
|
||||
end
|
||||
Reference in New Issue
Block a user