mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
25 lines
439 B
Lua
25 lines
439 B
Lua
|
local tap_module = {}
|
||
|
|
||
|
local os = require("os")
|
||
|
|
||
|
local counter = 1
|
||
|
local failed = false
|
||
|
|
||
|
function tap_module.ok(assert_true, desc)
|
||
|
local msg = ( assert_true and "ok " or "not ok " ) .. counter
|
||
|
if ( not assert_true ) then
|
||
|
failed = true
|
||
|
end
|
||
|
if ( desc ) then
|
||
|
msg = msg .. " - " .. desc
|
||
|
end
|
||
|
print(msg)
|
||
|
counter = counter + 1
|
||
|
end
|
||
|
|
||
|
function tap_module.exit()
|
||
|
os.exit(failed and 1 or 0)
|
||
|
end
|
||
|
|
||
|
return tap_module
|