feat(test): add real UE 5.8 RunLuaTests commandlet, Lua.RunTests command, and fix UnLua .d.ts math/UObject bugs
This commit is contained in:
1 parent
3dd61c32a9
commit
96e3f0d009
29 files changed
+1417
-134
No files matched your search
@@ -127,26 +127,36 @@ function ____exports.GetSummary()
|
||||
end
|
||||
return {total = #results, passed = passed, failed = failed, results = results}
|
||||
end
|
||||
function ____exports.PrintReport()
|
||||
local summary = ____exports.GetSummary()
|
||||
function ____exports.FormatReport(summary)
|
||||
local s = summary or ____exports.GetSummary()
|
||||
local lines = {}
|
||||
local lastSuite = ""
|
||||
do
|
||||
local i = 0
|
||||
while i < #summary.results do
|
||||
local r = summary.results[i + 1]
|
||||
while i < #s.results do
|
||||
local r = s.results[i + 1]
|
||||
if r.suite ~= lastSuite then
|
||||
lastSuite = r.suite
|
||||
print(string.format("\n[%s]", r.suite))
|
||||
lines[#lines + 1] = ""
|
||||
lines[#lines + 1] = string.format("[%s]", r.suite)
|
||||
end
|
||||
if r.passed then
|
||||
print(string.format(" PASS %s", r.name))
|
||||
lines[#lines + 1] = string.format(" PASS %s", r.name)
|
||||
else
|
||||
print(string.format(" FAIL %s\n -> %s", r.name, r.errorMessage or "unknown error"))
|
||||
lines[#lines + 1] = string.format(" FAIL %s\n -> %s", r.name, r.errorMessage or "unknown error")
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
print(string.format("\n========================================\nTotal: %d | Passed: %d | Failed: %d\n========================================", summary.total, summary.passed, summary.failed))
|
||||
lines[#lines + 1] = ""
|
||||
lines[#lines + 1] = "========================================"
|
||||
lines[#lines + 1] = string.format("Total: %d | Passed: %d | Failed: %d", s.total, s.passed, s.failed)
|
||||
lines[#lines + 1] = "========================================"
|
||||
return table.concat(lines, "\n")
|
||||
end
|
||||
function ____exports.PrintReport()
|
||||
local summary = ____exports.GetSummary()
|
||||
print(____exports.FormatReport(summary))
|
||||
return summary
|
||||
end
|
||||
return ____exports
|
||||
Reference in new issue
Block a user