Content deleted Content added
100 characters is still a little too much to view comfortably |
Danmichaelo (talk | contribs) testing if we can use a single column "message" instead of the two columns "actual" and "expected" |
||
Line 105:
function ScribuntoUnit:assertTrue(actual, message)
if not actual then
DebugHelper.raise({ScribuntoUnit = true,
text = string.format("Failed to assert that %s is true", tostring(actual)), message = message end
end
Line 115 ⟶ 118:
function ScribuntoUnit:assertFalse(actual, message)
if actual then
DebugHelper.raise({ScribuntoUnit = true,
text = string.format("Failed to assert that %s is false", tostring(actual)), message = message end
end
Line 124 ⟶ 130:
-- @param plain search is made with a plain string instead of a ustring pattern
--
function ScribuntoUnit:
end
Line 159 ⟶ 165:
function ScribuntoUnit:assertEquals(expected, actual, message)
self:assertWithinDelta(expected, actual, 1e-8, message)
DebugHelper.raise({
ScribuntoUnit = true,
Line 255 ⟶ 261:
if processed1 ~= processed2 then
DebugHelper.raise({
ScribuntoUnit = true,
text = string.format("Failed to assert that %s equals expected %s after preprocessing", processed1, processed2),
message = message,
}, 2)
Line 414 ⟶ 416:
local successIcon, failIcon = self.frame:preprocess('{{tick}}'), self.frame:preprocess('{{cross}}')
local text = '{| class="wikitable scribunto-test-table"\n'
text = text .. '! !! Name !!
for _, result in ipairs(testData.results) do
text = text .. '|-\n'
if result.error then
text = text .. '| ' .. failIcon .. ' || ' .. result.name .. ' || '
▲ else
▲ end
else
text = text .. '| ' .. successIcon .. ' || ' .. result.name .. ' || ||\n'
|