local e=require("\064\102\114\107\116\101\115\116\047\102\114\107\116\101\115\116")local W=e.test local w=e.assert.check local m=e.assert.require local u=e.assert.msg return function()W.suite("\065 \099\111\108\108\101\099\116\105\111\110 \111\102 \116\101\115\116\115",function()W.case("\065 \116\101\115\116 \116\104\097\116 \112\097\115\115\101\115",function()local e=4 local W=4 w.equal(W,e)end)W.case("\065 \116\101\115\116 \116\104\097\116 \102\097\105\108\115",function()local e=3 local W=4 w.equal(W,e)end)W.case("\072\097\108\116 \101\097\114\108\121",function()local e=nil m.not_nil(e)w.falsy(e.b)end)W.case("\067\117\115\116\111\109 \109\101\115\115\097\103\101\115\033",function()w.equal(1,2,u("\109\121 \109\101\115\115\097\103\101 \112\114\105\110\116\115 \105\110 \097\100\100\105\116\105\111\110 \116\111 \116\104\101 \101\120\112\097\110\115\105\111\110"))end)W.case("\065\114\114\097\121 \097\115\115\101\114\116\105\111\110\115",function()local e={"\097","\098","\099"}local W={"\097","\122"}w.array.contains(e,{"\122","\120"})w.array.equal(e,W)end)W.case("\084\097\098\108\101 \097\115\115\101\114\116\105\111\110\115",function()local e={a=1;b=2;c={a=1,b=2}}local W={a=1,b=22;c={a=-1}}w.table.contains(e,"\098")w.table.equal(e,W)end)end)end
local frktest = require("@frktest/frktest")
local test = frktest.test
local check = frktest.assert.check
local req = frktest.assert.require
local msg = frktest.assert.msg

return function()
    test.suite("A collection of tests", function()
        test.case("A test that passes", function()
            local exp = 4
            local got = 2 + 2
            check.equal(got, exp)
        end)

        test.case("A test that fails", function()
            local exp = 3
            local got = 2 + 2
            check.equal(got, exp)
        end)

        test.case("Halt early", function()
            local a = nil
            req.not_nil(a)
            check.falsy(a.b)
        end)

        test.case("Custom messages!", function()
            check.equal(1, 2, msg("my message prints in addition to the expansion"))
        end)

        test.case("Array assertions", function()
            local a = { "a", "b", "c" }
            local b = { "a", "z" }
            check.array.contains(a, { "z", "x" })
            check.array.equal(a, b)
        end)

        test.case("Table assertions", function()
            local a = { a = 1, b = 2, c = { a = 1, b = 2 } }
            local b = { a = 1, b = 22, c = { a = -1 } }
            check.table.contains(a, "b")
            check.table.equal(a, b)
        end)
    end)
end
