Files
love/testing/tests/sound.lua
T
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

19 lines
622 B
Lua

-- love.sound
-- love.sound.newDecoder
-- @NOTE this is just basic nil checking, full obj test are in objects.lua
love.test.sound.newDecoder = function(test)
local decoder = love.sound.newDecoder('resources/click.ogg')
test:assertObject(decoder)
end
-- love.sound.newSoundData
-- @NOTE this is just basic nil checking, full obj test are in objects.lua
love.test.sound.newSoundData = function(test)
local sounddata = love.sound.newSoundData('resources/click.ogg')
test:assertObject(sounddata)
local soundbeep = love.sound.newSoundData(math.floor((1/32)*44100), 44100, 16, 1)
test:assertObject(soundbeep)
end