Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module:Sandbox/isaacl/Probability/testcases

From Wikipedia, the free encyclopedia
local me = { }

local Probability = require('Module:Sandbox/isaacl/Probability')

function me:run(frame)
    local result = ''

    result = result .. me:test_randomInt()

    return result
end  -- function me:run()

function me:test_randomInt()
    local result = ''
    for i = 1, 20 do
        result = result
          .. '* Executing Probability.randomInt(10): ' .. Probability.randomInt(10,2) .. '\n'
    end
    local bigNumber = 2^35
    for i = 1, 20 do
        result = result
          .. '* Executing Probability.randomInt('..bigNumber..'): '
          .. Probability.randomInt(bigNumber) .. '\n'
    end
    return result
end

function me.run_tests(frame)
	return me:run(frame)
end

return me