touch.lua 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. -- love.touch
  2. -- @NOTE we can't test this module fully as it's hardware dependent
  3. -- however we can test methods do what is expected and can handle certain params
  4. --------------------------------------------------------------------------------
  5. --------------------------------------------------------------------------------
  6. ------------------------------------METHODS-------------------------------------
  7. --------------------------------------------------------------------------------
  8. --------------------------------------------------------------------------------
  9. -- love.touch.getPosition
  10. -- @TODO is there a way to fake the touchid pointer?
  11. love.test.touch.getPosition = function(test)
  12. test:assertNotNil(love.touch.getPosition)
  13. test:assertEquals('function', type(love.touch.getPosition))
  14. end
  15. -- love.touch.getPressure
  16. -- @TODO is there a way to fake the touchid pointer?
  17. love.test.touch.getPressure = function(test)
  18. test:assertNotNil(love.touch.getPressure)
  19. test:assertEquals('function', type(love.touch.getPressure))
  20. end
  21. -- love.touch.getTouches
  22. love.test.touch.getTouches = function(test)
  23. test:assertEquals('function', type(love.touch.getTouches))
  24. end