|
@@ -376,17 +376,14 @@ TestMethod = {
|
|
|
|
|
|
-- @method - TestMethod:isOS()
|
|
-- @method - TestMethod:isOS()
|
|
-- @desc - checks for a specific OS (or list of OSs)
|
|
-- @desc - checks for a specific OS (or list of OSs)
|
|
- -- @param {string||table} - single OS string or list of OSs that are allowed,
|
|
|
|
- -- these will be checked agaisnt love.system.getOS()'s return value
|
|
|
|
|
|
+ -- @param {string/s} - each arg passed will be checked as a valid OS, as long
|
|
|
|
+ -- as one passed the function will return true
|
|
-- @return {boolean} - returns true if one of the OSs given matches actual OS
|
|
-- @return {boolean} - returns true if one of the OSs given matches actual OS
|
|
- isOS = function(self, oss)
|
|
|
|
- if type(oss) == 'table' then
|
|
|
|
- for o=1,#oss do
|
|
|
|
- if oss[o] == love.test.current_os then return true end
|
|
|
|
- end
|
|
|
|
- else
|
|
|
|
- return love.test.current_os == oss
|
|
|
|
|
|
+ isOS = function(self, ...)
|
|
|
|
+ for os=1,select("#", ...) do
|
|
|
|
+ if select(os, ...) == love.test.current_os then return true end
|
|
end
|
|
end
|
|
|
|
+ return false
|
|
end,
|
|
end,
|
|
|
|
|
|
-- @method - TestMethod:evaluateTest()
|
|
-- @method - TestMethod:evaluateTest()
|