Skip to content

Commit

Permalink
debug playback device on runners
Browse files Browse the repository at this point in the history
  • Loading branch information
ellraiser committed Feb 25, 2024
1 parent d70d73b commit 2700190
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/audio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,16 @@ love.test.audio.setPlaybackDevice = function(test)
-- check method
test:assertNotNil(love.audio.setPlaybackDevice)
-- check blank string name
-- local success1, msg1 = love.audio.setPlaybackDevice('')
-- test:assertFalse(success1, 'check blank device fails')
local success1, msg1 = love.audio.setPlaybackDevice('')
test:assertFalse(success1, 'check blank device fails')
-- check invalid name
local success2, msg2 = love.audio.setPlaybackDevice('loveFM')
test:assertFalse(success2, 'check invalid device fails')
-- check setting already set
local success3, msg3 = love.audio.setPlaybackDevice(love.audio.getPlaybackDevice()) -- current name
test:assertFalse(success3, 'check existing device fails')
print("love.test.audio.setPlaybackDevice")
print(success1, msg1, success2, msg2, success3, msg3)
-- if other devices to play with lets set a different one
local devices = love.audio.getPlaybackDevices()
if #devices > 1 then
Expand Down

0 comments on commit 2700190

Please sign in to comment.