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 return function()W.suite("\065\114\114\097\121\115",function()W.case("\099\111\110\116\097\105\110\115",function()local e={"\111\110\101","\116\119\111","\116\104\114\101\101","\102\111\117\114","\102\105\118\101"}w.array.contains(e,"\101\108\101\118\101\110")w.array.contains(e,{"\102\111\117\114","\102\105\118\101";"\115\105\120";"\115\101\118\101\110"})end)W.case("\101\113\117\097\108 \099\104\097\110\103\101\100",function()local e={1,2,3,4,5}local W={1;2,10;4,5}w.array.equal(e,W)end)W.case("\101\113\117\097\108 \101\120\116\114\097",function()local e={1,2,3,4;5}local W={1,2,3,4;5;6,7}w.array.equal(e,W)end)W.case("\101\113\117\097\108 \102\101\119\101\114",function()local e={1,2;3,4;5}local W={1;2,3}w.array.equal(e,W)end)W.case("\101\113\117\097\108 \099\104\097\110\103\101\100 \097\110\100 \109\111\114\101",function()local e={1,2;3;4;5}local W={1,20,3;4,5;6,7}w.array.equal(e,W)end)W.case("\102\111\114 \097\114\114\097\121\115 \119\105\116\104 \116\097\098\108\101\115\044 \121\111\117 \115\104\111\117\108\100 \117\115\101 \099\104\101\099\107\046\116\097\098\108\101\046\101\113\117\097\108",function()local e={{a=1};{a=2}}local W={{a=1};{a=2}}w.array.equal(e,W)end)end)end
local frktest = require("@frktest/frktest")
local test = frktest.test
local check = frktest.assert.check

return function()
    test.suite("Arrays", function()
        test.case("contains", function()
            local a = { "one", "two", "three", "four", "five" }
            check.array.contains(a, "eleven") -- check for one value
            check.array.contains(a, { "four", "five", "six", "seven" }) -- check for multiple values
        end)

        test.case("equal changed", function()
            local a = { 1, 2, 3, 4, 5 }
            local b = { 1, 2, 10, 4, 5 }
            check.array.equal(a, b)
        end)

        test.case("equal extra", function()
            local a = { 1, 2, 3, 4, 5 }
            local b = { 1, 2, 3, 4, 5, 6, 7 }
            check.array.equal(a, b)
        end)

        test.case("equal fewer", function()
            local a = { 1, 2, 3, 4, 5 }
            local b = { 1, 2, 3 }
            check.array.equal(a, b)
        end)

        test.case("equal changed and more", function()
            local a = { 1, 2, 3, 4, 5 }
            local b = { 1, 20, 3, 4, 5, 6, 7 }
            check.array.equal(a, b)
        end)

        test.case("for arrays with tables, you should use check.table.equal", function()
            local a = { { a = 1 }, { a = 2 } }
            local b = { { a = 1 }, { a = 2 } }
            check.array.equal(a, b)
        end)
    end)
end
