return function()local E=(game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")).Packages.Monolith local p=require(E.LinkedList)describe("\067\111\110\115\116\114\117\099\116\111\114",function()it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097\110 \101\109\112\116\121 \076\105\110\107\101\100\076\105\115\116",function()local E=p.new();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \097 \116\097\098\108\101",function()local E={1,2;3,4;5}local R=p.new(E);(expect(R:Count())).to.equal(#E)for E,p in ipairs(E)do(expect(R:Get(E))).to.equal(p)end end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \097 \067\111\108\108\101\099\116\105\111\110",function()local E=p.new({1;2;3;4,5})local R=p.new(E);(expect(R:Count())).to.equal(E:Count())for E,p in E:Enumerator()do(expect(R:Get(E))).to.equal(p)end end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \099\114\101\097\116\101 \097 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \097 \110\111\110-\116\097\098\108\101",function()(expect(function()p.new(true)end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \116\121\112\101 \098\111\111\108\101\097\110\046");(expect(function()p.new(1)end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \116\121\112\101 \110\117\109\098\101\114\046");(expect(function()p.new("\115\116\114\105\110\103")end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \116\121\112\101 \115\116\114\105\110\103\046");(expect(function()p.new(function() end)end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \116\121\112\101 \102\117\110\099\116\105\111\110\046");(expect(function()p.new(Instance.new("\070\111\108\100\101\114"))end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \116\121\112\101 \117\115\101\114\100\097\116\097\046");(expect(function()p.new(coroutine.create(function() end))end)).to.throw("\067\097\110\110\111\116 \099\111\110\115\116\114\117\099\116 \076\105\110\107\101\100\076\105\115\116 \102\114\111\109 \116\121\112\101 \116\104\114\101\097\100\046")end)end)describe("\069\110\117\109\101\114\097\098\108\101 \073\110\116\101\114\102\097\099\101",function()describe("\069\110\117\109\101\114\097\116\111\114",function()it("\115\104\111\117\108\100 \112\114\111\118\105\100\101 \097\110 \105\116\101\114\097\116\111\114 \103\101\110\101\114\097\116\111\114",function()local E=p.new()local R=E:Enumerator();(expect(R)).to.be.a("\102\117\110\099\116\105\111\110")end)it("\115\104\111\117\108\100 \101\110\117\109\101\114\097\116\101 \105\110 \097 \103\101\110\101\114\105\099 \102\111\114 \108\111\111\112",function()local E=p.new()local R=10 for p=1,R,1 do E:Add(p)end local g=0 for E,p in E:Enumerator()do g=g+1;(expect(E)).to.be.a("\110\117\109\098\101\114");(expect(p)).to.be.a("\110\117\109\098\101\114")end;(expect(g)).to.equal(R)end)end)end)describe("\067\111\108\108\101\099\116\105\111\110 \073\110\116\101\114\102\097\099\101",function()describe("\082\101\113\117\105\114\101\100 \077\101\116\104\111\100\115",function()describe("\067\111\110\116\097\105\110\115",function()it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:Contains(0))).to.equal(false)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\097\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115",function()local E=p.new({1;2,3;4;5});(expect(E:Contains(1))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\097\116 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1;2,3,4;5});(expect(E:Contains(0))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \117\110\116\105\108 \105\116 \105\115 \097\100\100\101\100",function()local E=p.new({1,2;3,4;5});(expect(E:Contains(0))).to.equal(false)E:Add(0);(expect(E:Contains(0))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \102\105\110\100 \097\110 \101\108\101\109\101\110\116 \119\104\101\110 \105\116\115 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3;4,5});(expect(E:Contains(1))).to.equal(true)E:Remove(1);(expect(E:Contains(1))).to.equal(false)end)end)describe("\067\111\110\116\097\105\110\115\065\108\108",function()it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2,3,4,5});(expect(E:ContainsAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\108\108 \122\101\114\111 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101 \112\114\111\118\105\100\101\100 \067\111\108\108\101\099\116\105\111\110 \105\115 \101\109\112\116\121",function()local E=p.new({1;2,3,4;5})local R=p.new();(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \097\108\108 \111\102 \116\104\101 \101\108\101\109\101\110\116\115 \101\120\105\115\116",function()local E=p.new({1;2,3,4,5})local R=p.new({1;2,3;4;5});(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \101\120\105\115\116\115",function()local E=p.new({1;2,3;4,5})local R=p.new({3});(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \111\110\101 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,4;5})local R=p.new({1,2;3;4;5});(expect(E:ContainsAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,4;5})local R=p.new({3});(expect(E:ContainsAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \117\110\116\105\108 \116\104\101\121 \097\114\101 \097\100\100\101\100",function()local E=p.new()local R=p.new({1,2});(expect(E:ContainsAll(R))).to.equal(false)E:Add(1);(expect(E:ContainsAll(R))).to.equal(false)E:Add(2);(expect(E:ContainsAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101\121 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3,4,5})local R=p.new({1,2,3;4,5});(expect(E:ContainsAll(R))).to.equal(true)E:Remove(1);(expect(E:ContainsAll(R))).to.equal(false)end)end)describe("\067\111\110\116\097\105\110\115\065\110\121",function()it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2;3;4,5});(expect(E:ContainsAny(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \097\110\121 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\101 \112\114\111\118\105\100\101\100 \067\111\108\108\101\099\116\105\111\110 \105\115 \101\109\112\116\121",function()local E=p.new({1,2,3,4;5})local R=p.new();(expect(E:ContainsAny(R))).to.equal(false)end)it("\115\104\111\117\108\100 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116\115 \101\120\105\115\116",function()local E=p.new({1;2,3,4;5})local R=p.new({1;2;3;4;5});(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \101\120\105\115\116\115",function()local E=p.new({1,2;3,4,5})local R=p.new({3});(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \102\105\110\100 \115\111\109\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \111\110\108\121 \111\110\101 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1;2,4,5})local R=p.new({1,2,3;4,5});(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \105\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,4;5})local R=p.new({3});(expect(E:ContainsAny(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \102\105\110\100 \101\108\101\109\101\110\116\115 \117\110\116\105\108 \116\104\101\121 \097\114\101 \097\100\100\101\100",function()local E=p.new()local R=p.new({1;2});(expect(E:ContainsAny(R))).to.equal(false)E:Add(1);(expect(E:ContainsAny(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \102\105\110\100 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101\121 \097\114\101 \097\108\108 \114\101\109\111\118\101\100",function()local E=p.new({1;2;3,4;5})local R=p.new({1;2,3;4,5});(expect(E:ContainsAny(R))).to.equal(true)E:Remove(1);(expect(E:ContainsAny(R))).to.equal(true)E:Clear();(expect(E:ContainsAny(R))).to.equal(false)end)end)describe("\067\111\117\110\116",function()it("\115\104\111\117\108\100 \099\111\117\110\116 \122\101\114\111 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \099\111\117\110\116 \116\104\101 \110\117\109\098\101\114 \111\102 \101\108\101\109\101\110\116\115 \105\110 \116\104\101 \076\105\110\107\101\100\076\105\115\116",function()local E=p.new({1;2;3,4;5});(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \099\111\117\110\116 \110\101\119 \101\108\101\109\101\110\116\115 \119\104\101\110 \116\104\101\121 \097\114\101 \097\100\100\101\100",function()local E=p.new()local R=10;(expect(E:Count())).to.equal(0)for p=1,R,1 do E:Add(p);(expect(E:Count())).to.equal(p)end;(expect(E:Count())).to.equal(R)end)it("\115\104\111\117\108\100 \110\111\116 \099\111\117\110\116 \101\108\101\109\101\110\116\115 \097\102\116\101\114 \116\104\101\121 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1;2;3;4;5})local R=E:Count();(expect(R)).to.equal(5)while R>0 do E:Pop()local p=R R=E:Count();(expect(R)).to.equal(p-1)end end)it("\115\104\111\117\108\100 \099\111\117\110\116 \122\101\114\111 \097\102\116\101\114 \098\101\105\110\103 \099\108\101\097\114\101\100",function()local E=p.new({1;2,3;4,5});(expect(E:Count())).to.equal(5)E:Clear();(expect(E:Count())).to.equal(0)end)end)describe("\069\109\112\116\121",function()it("\115\104\111\117\108\100 \098\101 \101\109\112\116\121 \119\104\101\110 \105\110\115\116\097\110\116\105\097\116\101\100",function()local E=p.new();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \098\101 \101\109\112\116\121 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Empty())).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \098\101 \101\109\112\116\121 \119\105\116\104 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3,4;5});(expect(E:Empty())).to.equal(false)end)it("\115\104\111\117\108\100 \110\111 \108\111\110\103\101\114 \098\101 \101\109\112\116\121 \097\102\116\101\114 \097\110 \101\108\101\109\101\110\116 \105\115 \097\100\100\101\100",function()local E=p.new();(expect(E:Empty())).to.equal(true)E:Add(1);(expect(E:Empty())).to.equal(false)end)it("\115\104\111\117\108\100 \098\101 \101\109\112\116\121 \097\102\116\101\114 \097\108\108 \101\108\101\109\101\110\116\115 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1,2;3,4;5})local R=E:Count()while R>0 do(expect(E:Empty())).to.equal(false)E:Pop()R=E:Count()end;(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \098\101 \101\109\112\116\121 \097\102\116\101\114 \098\101\105\110\103 \099\108\101\097\114\101\100",function()local E=p.new({1,2,3,4;5});(expect(E:Empty())).to.equal(false)E:Clear();(expect(E:Empty())).to.equal(true)end)end)describe("\084\111\065\114\114\097\121",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \116\097\098\108\101",function()local E=p.new();(expect(E:ToArray())).to.be.a("\116\097\098\108\101")end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \116\097\098\108\101 \111\102 \116\104\101 \115\097\109\101 \115\105\122\101",function()local E=p.new({1;2,3,4,5});(expect(#E:ToArray())).to.equal(E:Count())end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097\110 \101\109\112\116\121 \116\097\098\108\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(#E:ToArray())).to.equal(0)end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \116\097\098\108\101 \119\105\116\104 \116\104\101 \115\097\109\101 \101\108\101\109\101\110\116\115 \097\110\100 \111\114\100\101\114 \111\102 \101\110\117\109\101\114\097\116\105\111\110",function()local E=p.new({1;2;3,4,5})local R=E:ToArray();(expect(#R)).to.equal(E:Count())for p,R in ipairs(R)do(expect(R)).to.equal(E:Get(p))end end)it("\115\104\111\117\108\100 \112\114\111\118\105\100\101 \111\110\108\121 \097\114\114\097\121 \105\110\100\101\120\097\098\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4;5})local R=E:ToArray()local g=0 for E in pairs(R)do g=g+1 end;(expect(g)).to.equal(#R)end)end)describe("\084\111\084\097\098\108\101",function()it("\115\104\111\117\108\100 \112\114\111\118\105\100\101 \116\104\101 \115\097\109\101 \114\101\112\114\101\115\101\110\116\097\116\105\111\110 \097\115 \084\111\065\114\114\097\121",function()local E=p.new({1;2;3,4,5})local R=E:ToArray()local g=E:ToTable();(expect(g)).to.be.a("\116\097\098\108\101");(expect(#g)).to.equal(#R)for E,p in pairs(g)do(expect(p)).to.equal(R[E])end end)end)end)describe("\079\112\116\105\111\110\097\108 \077\101\116\104\111\100\115",function()describe("\065\100\100",function()it("\115\104\111\117\108\100 \097\100\100 \101\108\101\109\101\110\116\115 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()E:Add(1);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \097\100\100 \101\108\101\109\101\110\116\115 \119\104\101\110 \110\111\116 \101\109\112\116\121",function()local E=p.new({1,2,3,4,5})E:Add(6);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \097\100\100 \101\108\101\109\101\110\116\115 \116\111 \116\104\101 \101\110\100",function()local E=p.new({1;2;3;4,5})E:Add(1);(expect(E:Last())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new();(expect(E:Add(1))).to.equal(true)end)it("\115\104\111\117\108\100 \097\100\100 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;1;1;1;1})E:Add(1);(expect(E:Count())).to.equal(6)end)end)describe("\065\100\100\065\108\108",function()it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2,3;4;5})E:AddAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1})E:AddAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \110\111\116 \101\109\112\116\121",function()local E=p.new({1,2,3,4,5})local R=p.new({6,7,8;9,0})E:AddAll(R);(expect(E:Count())).to.equal(10)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \110\111\116 \101\109\112\116\121",function()local E=p.new({1,2;3,4;5})local R=p.new({6})E:AddAll(R);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \116\111 \116\104\101 \101\110\100",function()local E=p.new({1,2;3,4;5})local R=p.new({6;7,8,9;10})E:AddAll(R);(expect(E:Get(6))).to.equal(6);(expect(E:Get(7))).to.equal(7);(expect(E:Get(8))).to.equal(8);(expect(E:Get(9))).to.equal(9);(expect(E:Get(10))).to.equal(10)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \101\108\101\109\101\110\116 \116\111 \116\104\101 \101\110\100",function()local E=p.new({1,2;3,4,5})local R=p.new({6})E:AddAll(R);(expect(E:Get(6))).to.equal(6)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \097\100\100\105\110\103 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new()local R=p.new({6;7;8;9;10});(expect(E:AddAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \097\100\100\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new()local R=p.new({6});(expect(E:AddAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \097\100\100 \109\117\108\116\105\112\108\101 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;1,1,1;1})local R=p.new({1;1,1,1;1})E:AddAll(R);(expect(E:Count())).to.equal(10)end)it("\115\104\111\117\108\100 \097\100\100 \111\110\101 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116",function()local E=p.new({1;1;1;1,1})local R=p.new({1})E:AddAll(R);(expect(E:Count())).to.equal(6)end)end)describe("\067\108\101\097\114",function()it("\115\104\111\117\108\100 \099\108\101\097\114 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4;5});(expect(E:Empty())).to.equal(false)E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\104\101\110 \097\108\114\101\097\100\121 \101\109\112\116\121",function()local E=p.new()E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\105\116\104 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4;5})E:Clear();(expect(E:Empty())).to.equal(true)end)it("\115\104\111\117\108\100 \099\108\101\097\114 \119\105\116\104 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,1,1,1;1})E:Clear();(expect(E:Empty())).to.equal(true)end)end)describe("\082\101\109\111\118\101",function()it("\115\104\111\117\108\100 \115\117\099\099\101\115\115\102\117\108\108\121 \097\116\116\101\109\112\116 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Remove(1)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:Remove(1))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Remove(1);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Remove(1))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1;2,3;4;5})E:Remove(3);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \097\110 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1,2,3;4;5});(expect(E:Remove(3))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \114\101\109\111\118\101 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,3,4;5})E:Remove(6);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\110 \101\108\101\109\101\110\116 \105\115\110\'\116 \114\101\109\111\118\101\100",function()local E=p.new({1;2;3,4;5});(expect(E:Remove(6))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116 \119\104\101\110 \116\104\101\114\101 \097\114\101 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1;1,1;1,1})E:Remove(1);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \097 \100\117\112\108\105\099\097\116\101",function()local E=p.new({1;1,1;1;1});(expect(E:Remove(1))).to.equal(true)end)end)describe("\082\101\109\111\118\101\065\108\108",function()it("\115\104\111\117\108\100 \115\117\099\099\101\115\115\102\117\108\108\121 \097\116\116\101\109\112\116 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1;2;3,4,5});(expect(function()E:RemoveAll(R)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\109\111\118\101 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2;3;4,5});(expect(E:RemoveAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1})E:RemoveAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1})local R=p.new({1,2,3;4;5})E:RemoveAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1})local R=p.new({1,2;3,4;5});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1,2;3;4,5})local R=p.new({1})E:RemoveAll(R);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1;2;3;4;5})local R=p.new({1});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \110\111\116 \114\101\109\111\118\101 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \101\120\105\115\116",function()local E=p.new({1,2,3;4,5})local R=p.new({0})E:RemoveAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\110 \101\108\101\109\101\110\116 \105\115\110\'\116 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3,4,5})local R=p.new({0});(expect(E:RemoveAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4,5})local R=p.new({1;2,3,4;5})E:RemoveAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3;4,5})local R=p.new({1;2;3,4,5});(expect(E:RemoveAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \111\110\108\121 \111\110\099\101 \102\111\114 \101\097\099\104 \111\099\099\117\114\114\101\110\099\101 \111\102 \100\117\112\108\105\099\097\116\101 \101\108\101\109\101\110\116\115",function()local E=p.new({1;1;1;1;1})local R=p.new({1,1,1})E:RemoveAll(R);(expect(E:Count())).to.equal(2)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\109\111\118\105\110\103 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1;1;1;1;1})local R=p.new({1,1,1});(expect(E:RemoveAll(R))).to.equal(true)end)end)describe("\082\101\116\097\105\110\065\108\108",function()it("\115\104\111\117\108\100 \115\117\099\099\101\115\115\102\117\108\108\121 \097\116\116\101\109\112\116 \116\111 \114\101\116\097\105\110 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2,3;4;5});(expect(function()E:RetainAll(R)end)).never.to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({1,2;3;4,5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1})E:RetainAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({1});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115 \116\111 \114\101\116\097\105\110",function()local E=p.new({1})local R=p.new({1,2;3,4;5})E:RetainAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115 \116\111 \114\101\116\097\105\110",function()local E=p.new({1})local R=p.new({1,2;3,4;5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \110\111\116 \114\101\116\097\105\110 \111\110\101 \101\108\101\109\101\110\116 \119\104\105\099\104 \100\111\101\115 \110\111\116 \109\097\116\099\104",function()local E=p.new({1})local R=p.new({0})E:RetainAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \110\111\116 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116 \116\104\097\116 \100\111\101\115 \110\111\116 \109\097\116\099\104",function()local E=p.new({1})local R=p.new({0});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1;2;3;4,5})local R=p.new({3})E:RetainAll(R);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116 \102\114\111\109 \109\097\110\121",function()local E=p.new({1,2,3,4;5})local R=p.new({3});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \110\111 \101\108\101\109\101\110\116\115 \119\104\101\110 \111\110\101 \101\108\101\109\101\110\116 \100\111\101\115 \110\111\116 \109\097\116\099\104",function()local E=p.new({1;2;3,4,5})local R=p.new({6})E:RetainAll(R);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \110\111\116 \114\101\116\097\105\110\105\110\103 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1;2;3,4;5})local R=p.new({6});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \109\111\114\101 \101\120\105\115\116",function()local E=p.new({1,2;3,4,5})local R=p.new({1,3;5})E:RetainAll(R);(expect(E:Count())).to.equal(3)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \109\111\114\101 \101\120\105\115\116",function()local E=p.new({1;2;3;4,5})local R=p.new({1,3;5});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4;5})local R=p.new({0;1,3})E:RetainAll(R);(expect(E:Count())).to.equal(2)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \097\116\116\101\109\112\105\110\103 \116\111 \114\101\116\097\105\110 \119\105\116\104 \101\120\099\101\115\115 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5})local R=p.new({0,1;3});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4;5})local R=p.new({1,2;3,4;5})E:RetainAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4,5})local R=p.new({1,2,3;4,5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \101\108\101\109\101\110\116\115 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\115\115",function()local E=p.new({1,2,3,4,5})local R=p.new({0,1,2;3,4,5})E:RetainAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\101\115\115 \097\110\100 \114\101\116\097\105\110\105\110\103 \097\108\108 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4;5})local R=p.new({0,1;2;3;4,5});(expect(E:RetainAll(R))).to.equal(false)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1,1;2;2;3})local R=p.new({1;2})E:RetainAll(R);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \100\117\112\108\105\099\097\116\101\115 \097\110\100 \109\111\114\101 \101\120\105\115\116",function()local E=p.new({1,1,2,2;3})local R=p.new({1;2});(expect(E:RetainAll(R))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\097\105\110 \097\108\108 \100\117\112\108\105\099\097\116\101\115 \119\104\101\110 \097\116\116\101\109\112\105\110\103 \116\111 \114\101\116\097\105\110 \101\120\099\101\115\115",function()local E=p.new({1;1;1;1,1})local R=p.new({1;2})E:RetainAll(R);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \114\101\116\097\105\110\105\110\103 \097\108\108 \100\117\112\108\105\099\097\116\101\115",function()local E=p.new({1,1,1,1,1})local R=p.new({1});(expect(E:RetainAll(R))).to.equal(false)end)end)end)end)describe("\076\105\115\116 \073\110\116\101\114\102\097\099\101",function()describe("\082\101\113\117\105\114\101\100 \077\101\116\104\111\100\115",function()describe("\070\105\114\115\116",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:First()end)).to.throw("\078\111 \102\105\114\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \102\105\114\115\116 \101\108\101\109\101\110\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:First())).to.equal(1)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \102\105\114\115\116 \101\108\101\109\101\110\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4;5});(expect(E:First())).to.equal(1)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \102\105\114\115\116 \101\108\101\109\101\110\116 \119\104\101\110 \101\108\101\109\101\110\116\115 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3;4,5})E:Shift();(expect(E:First())).to.equal(2)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \097\108\108 \101\108\101\109\101\110\116\115 \104\097\118\101 \098\101\101\110 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3;4;5})while E:Count()>0 do E:Shift()end;(expect(function()E:First()end)).to.throw("\078\111 \102\105\114\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)end)describe("\071\101\116",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \097\116\116\101\109\112\116\105\110\103 \103\101\116 \097\110 \101\108\101\109\101\110\116 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Get(1)end)).to.throw("\073\110\100\101\120 \'\049\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \103\101\116 \097\110 \101\108\101\109\101\110\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Get(1))).to.equal(1)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(function()E:Get(2)end)).to.throw("\073\110\100\101\120 \'\050\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \103\101\116 \097\110 \101\108\101\109\101\110\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4,5})for p=1,E:Count(),1 do(expect(E:Get(p))).to.equal(p)end end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3,4,5});(expect(function()E:Get(6)end)).to.throw("\073\110\100\101\120 \'\054\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)end)describe("\073\110\100\101\120\079\102",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \122\101\114\111 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:IndexOf(1))).to.equal(0)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \112\114\111\118\105\100\105\110\103 \097\110 \105\110\100\101\120 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:IndexOf(1,1)end)).to.throw("\073\110\100\101\120 \'\049\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \102\105\110\100 \116\104\101 \105\110\100\101\120 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:IndexOf(1))).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \122\101\114\111 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115\110\'\116 \101\120\105\115\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:IndexOf(0))).to.equal(0)end)it("\115\104\111\117\108\100 \097\099\099\101\112\116 \111\110\101 \097\115 \097 \115\116\097\114\116\105\110\103 \105\110\100\101\120 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:IndexOf(1,1))).to.equal(1)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \116\104\101 \105\110\100\101\120 \105\115 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(function()E:IndexOf(1,2)end)).to.throw("\073\110\100\101\120 \'\050\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \102\105\110\100 \116\104\101 \105\110\100\101\120 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4;5});(expect(E:IndexOf(3))).to.equal(3)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \122\101\114\111 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115\110\'\116 \101\120\105\115\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3,4,5});(expect(E:IndexOf(0))).to.equal(0)end)it("\115\104\111\117\108\100 \102\105\110\100 \116\104\101 \102\105\114\115\116 \105\110\100\101\120 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4;3});(expect(E:IndexOf(3))).to.equal(3)end)it("\115\104\111\117\108\100 \102\105\110\100 \116\104\101 \102\105\114\115\116 \101\108\101\109\101\110\116 \115\116\097\114\116\105\110\103 \119\105\116\104 \116\104\101 \105\110\100\101\120 \112\114\111\118\105\100\101\100",function()local E=p.new({1;2,3,4,3});(expect(E:IndexOf(3,4))).to.equal(5)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \116\104\101 \105\110\100\101\120 \105\115 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5});(expect(function()E:IndexOf(1,6)end)).to.throw("\073\110\100\101\120 \'\054\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)end)describe("\076\097\115\116",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Last()end)).to.throw("\078\111 \108\097\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \108\097\115\116 \101\108\101\109\101\110\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Last())).to.equal(1)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \108\097\115\116 \101\108\101\109\101\110\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3,4,5});(expect(E:Last())).to.equal(5)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \108\097\115\116 \101\108\101\109\101\110\116 \119\104\101\110 \101\108\101\109\101\110\116\115 \097\114\101 \114\101\109\111\118\101\100",function()local E=p.new({1,2,3;4;5})E:Pop();(expect(E:Last())).to.equal(4)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \097\108\108 \101\108\101\109\101\110\116\115 \104\097\118\101 \098\101\101\110 \114\101\109\111\118\101\100",function()local E=p.new({1;2;3;4;5})while E:Count()>0 do E:Pop()end;(expect(function()E:Last()end)).to.throw("\078\111 \108\097\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)end)describe("\076\097\115\116\073\110\100\101\120\079\102",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \122\101\114\111 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(E:LastIndexOf(1))).to.equal(0)end)it("\115\104\111\117\108\100 \102\105\110\100 \116\104\101 \105\110\100\101\120 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:LastIndexOf(1))).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \122\101\114\111 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115\110\'\116 \101\120\105\115\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:LastIndexOf(0))).to.equal(0)end)it("\115\104\111\117\108\100 \102\105\110\100 \116\104\101 \105\110\100\101\120 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4,5});(expect(E:LastIndexOf(3))).to.equal(3)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \122\101\114\111 \119\104\101\110 \116\104\101 \101\108\101\109\101\110\116 \100\111\101\115\110\'\116 \101\120\105\115\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4,5});(expect(E:LastIndexOf(0))).to.equal(0)end)it("\115\104\111\117\108\100 \102\105\110\100 \116\104\101 \108\097\115\116 \105\110\100\101\120 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4,3});(expect(E:LastIndexOf(3))).to.equal(5)end)end)describe("\083\117\098",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \112\114\111\118\105\100\105\110\103 \116\104\101 \102\105\114\115\116 \105\110\100\101\120 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Sub(1)end)).to.throw("\073\110\100\101\120 \'\049\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \115\117\098-\108\105\115\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect((E:Sub(1)):Get(1))).to.equal(1)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \116\104\101 \102\105\114\115\116 \105\110\100\101\120 \105\115 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(function()E:Sub(2)end)).to.throw("\073\110\100\101\120 \'\050\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \116\104\101 \108\097\115\116 \105\110\100\101\120 \105\115 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(function()E:Sub(1,2)end)).to.throw("\073\110\100\101\120 \'\050\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \115\117\098-\108\105\115\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3,4,5})local R=E:Sub(3);(expect(R:Count())).to.equal(3);(expect(R:Get(1))).to.equal(3);(expect(R:Get(2))).to.equal(4);(expect(R:Get(3))).to.equal(5)end)it("\115\104\111\117\108\100 \099\114\101\097\116\101 \097 \115\117\098-\108\105\115\116 \119\105\116\104 \097 \108\097\115\116 \105\110\100\101\120 \097\110\100 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3,4;5})local R=E:Sub(2,4);(expect(R:Count())).to.equal(3);(expect(R:Get(1))).to.equal(2);(expect(R:Get(2))).to.equal(3);(expect(R:Get(3))).to.equal(4)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \116\104\101 \102\105\114\115\116 \105\110\100\101\120 \105\115 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3;4;5});(expect(function()E:Sub(0)end)).to.throw("\073\110\100\101\120 \'\048\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \116\104\101 \108\097\115\116 \105\110\100\101\120 \105\115 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5});(expect(function()E:Sub(1,6)end)).to.throw("\073\110\100\101\120 \'\054\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \112\114\111\118\105\100\105\110\103 \097 \108\097\115\116 \105\110\100\101\120 \115\109\097\108\108\101\114 \116\104\097\110 \116\104\101 \102\105\114\115\116 \105\110\100\101\120",function()local E=p.new({1;2,3;4;5});(expect(function()E:Sub(4,2)end)).to.throw("\076\097\115\116 \105\110\100\101\120 \105\115 \115\109\097\108\108\101\114 \116\104\097\110 \102\105\114\115\116 \105\110\100\101\120\046")end)end)end)describe("\079\112\116\105\111\110\097\108 \077\101\116\104\111\100\115",function()describe("\068\101\108\101\116\101",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Delete(1)end)).to.throw("\073\110\100\101\120 \'\049\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \100\101\108\101\116\101 \119\104\101\110 \116\104\101\114\101 \105\115 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Delete(1);(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new({1});(expect(E:Delete(1))).to.equal(true)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(function()E:Delete(0)end)).to.throw("\073\110\100\101\120 \'\048\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \100\101\108\101\116\101 \119\104\101\110 \116\104\101\114\101 \097\114\101 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4,5})E:Delete(3);(expect(E:Count())).to.equal(4);(expect(E:Get(3))).to.equal(4)E:Delete(3);(expect(E:Count())).to.equal(3);(expect(E:Get(3))).to.equal(5)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3,4,5});(expect(function()E:Delete(6)end)).to.throw("\073\110\100\101\120 \'\054\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)end)describe("\073\110\115\101\114\116",function()it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\110 \105\116\101\109 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()E:Insert(1,1);(expect(E:Get(1))).to.equal(1)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Insert(0,1)end)).to.throw("\073\110\100\101\120 \'\048\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\110 \105\116\101\109 \097\116 \116\104\101 \102\114\111\110\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Insert(1,2);(expect(E:Get(1))).to.equal(2);(expect(E:Get(2))).to.equal(1)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\110 \105\116\101\109 \097\116 \116\104\101 \098\097\099\107 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Insert(2,2);(expect(E:Get(1))).to.equal(1);(expect(E:Get(2))).to.equal(2)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(function()E:Insert(3,2)end)).to.throw("\073\110\100\101\120 \'\051\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\110 \105\116\101\109 \097\116 \116\104\101 \102\114\111\110\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3;4;5})E:Insert(1,6);(expect(E:Get(1))).to.equal(6);(expect(E:Get(2))).to.equal(1);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\110 \105\116\101\109 \105\110 \116\104\101 \109\105\100\100\108\101 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3,4;5})E:Insert(3,6);(expect(E:Get(2))).to.equal(2);(expect(E:Get(3))).to.equal(6);(expect(E:Get(4))).to.equal(3);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\110 \105\116\101\109 \097\116 \116\104\101 \098\097\099\107 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4,5})E:Insert(6,6);(expect(E:Get(5))).to.equal(5);(expect(E:Get(6))).to.equal(6);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4;5});(expect(function()E:Insert(7,6)end)).to.throw("\073\110\100\101\120 \'\055\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new({1;2,3;4,5});(expect(E:Insert(1,6))).to.equal(true)end)end)describe("\073\110\115\101\114\116\065\108\108",function()it("\115\104\111\117\108\100 \105\110\115\101\114\116 \111\110\101 \105\116\101\109 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({6})E:InsertAll(1,R);(expect(E:Get(1))).to.equal(6)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\108\108 \105\116\101\109\115 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({6,7;8,9;10})E:InsertAll(1,R);(expect(E:Get(1))).to.equal(6);(expect(E:Get(2))).to.equal(7);(expect(E:Get(3))).to.equal(8);(expect(E:Get(4))).to.equal(9);(expect(E:Get(5))).to.equal(10)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()local R=p.new({6,7,8,9,10});(expect(function()E:InsertAll(0,R)end)).to.throw("\073\110\100\101\120 \'\048\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \111\110\101 \105\116\101\109 \097\116 \116\104\101 \102\114\111\110\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({6})E:InsertAll(1,R);(expect(E:Get(1))).to.equal(6);(expect(E:Get(2))).to.equal(1)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\108\108 \105\116\101\109\115 \097\116 \116\104\101 \102\114\111\110\116 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({6;7,8,9,10})E:InsertAll(1,R);(expect(E:Get(1))).to.equal(6);(expect(E:Get(2))).to.equal(7);(expect(E:Get(3))).to.equal(8);(expect(E:Get(4))).to.equal(9);(expect(E:Get(5))).to.equal(10);(expect(E:Get(6))).to.equal(1)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \111\110\101 \105\116\101\109 \097\116 \116\104\101 \098\097\099\107 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({6})E:InsertAll(2,R);(expect(E:Get(1))).to.equal(1);(expect(E:Get(2))).to.equal(6)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\108\108 \105\116\101\109\115 \097\116 \116\104\101 \098\097\099\107 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({6;7,8,9;10})E:InsertAll(2,R);(expect(E:Get(1))).to.equal(1);(expect(E:Get(2))).to.equal(6);(expect(E:Get(3))).to.equal(7);(expect(E:Get(4))).to.equal(8);(expect(E:Get(5))).to.equal(9);(expect(E:Get(6))).to.equal(10)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})local R=p.new({6,7;8,9,10});(expect(function()E:InsertAll(3,R)end)).to.throw("\073\110\100\101\120 \'\051\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \111\110\101 \105\116\101\109 \097\116 \116\104\101 \102\114\111\110\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3;4;5})local R=p.new({6})E:InsertAll(1,R);(expect(E:Get(1))).to.equal(6);(expect(E:Get(2))).to.equal(1);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\108\108 \105\116\101\109\115 \097\116 \116\104\101 \102\114\111\110\116 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4;5})local R=p.new({6,7,8;9;10})E:InsertAll(1,R);(expect(E:Get(1))).to.equal(6);(expect(E:Get(2))).to.equal(7);(expect(E:Get(3))).to.equal(8);(expect(E:Get(4))).to.equal(9);(expect(E:Get(5))).to.equal(10);(expect(E:Get(6))).to.equal(1);(expect(E:Count())).to.equal(10)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \111\110\101 \105\116\101\109 \105\110 \116\104\101 \109\105\100\100\108\101 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5})local R=p.new({6})E:InsertAll(3,R);(expect(E:Get(2))).to.equal(2);(expect(E:Get(3))).to.equal(6);(expect(E:Get(4))).to.equal(3);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\108\108 \105\116\101\109\115 \105\110 \116\104\101 \109\105\100\100\108\101 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3,4,5})local R=p.new({6,7,8,9,10})E:InsertAll(3,R);(expect(E:Get(2))).to.equal(2);(expect(E:Get(3))).to.equal(6);(expect(E:Get(4))).to.equal(7);(expect(E:Get(5))).to.equal(8);(expect(E:Get(6))).to.equal(9);(expect(E:Get(7))).to.equal(10);(expect(E:Get(8))).to.equal(3);(expect(E:Count())).to.equal(10)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \111\110\101 \105\116\101\109 \097\116 \116\104\101 \098\097\099\107 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5})local R=p.new({6})E:InsertAll(6,R);(expect(E:Get(5))).to.equal(5);(expect(E:Get(6))).to.equal(6);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \097\108\108 \105\116\101\109\115 \097\116 \116\104\101 \098\097\099\107 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3,4,5})local R=p.new({6;7;8;9;10})E:InsertAll(6,R);(expect(E:Get(5))).to.equal(5);(expect(E:Get(6))).to.equal(6);(expect(E:Get(7))).to.equal(7);(expect(E:Get(8))).to.equal(8);(expect(E:Get(9))).to.equal(9);(expect(E:Get(10))).to.equal(10);(expect(E:Count())).to.equal(10)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3,4,5})local R=p.new({6,7;8;9;10});(expect(function()E:InsertAll(7,R)end)).to.throw("\073\110\100\101\120 \'\055\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new({1;2;3;4,5})local R=p.new({6;7,8,9;10});(expect(E:InsertAll(1,R))).to.equal(true)end)end)describe("\080\111\112",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Pop()end)).to.throw("\078\111 \108\097\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \105\116\101\109 \102\114\111\109 \116\104\101 \101\110\100 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Pop();(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \101\108\101\109\101\110\116 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Pop())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \105\116\101\109 \102\114\111\109 \116\104\101 \101\110\100 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4;5})E:Pop();(expect(E:Last())).to.equal(4);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \101\108\101\109\101\110\116 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4,5});(expect(E:Pop())).to.equal(5)end)end)describe("\080\117\115\104",function()it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \101\110\100 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()E:Push(1);(expect(E:Last())).to.equal(1);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \101\110\100 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Push(2);(expect(E:Last())).to.equal(2);(expect(E:Count())).to.equal(2)end)it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \101\110\100 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3;4,5})E:Push(6);(expect(E:Last())).to.equal(6);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new({1,2;3,4,5});(expect(E:Push(6))).to.equal(true)end)end)describe("\083\101\116",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Set(1,1)end)).to.throw("\073\110\100\101\120 \'\049\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \115\101\116 \097\110 \105\116\101\109 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Set(1,2);(expect(E:Get(1))).to.equal(2);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \099\104\097\110\103\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Set(1,2))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \110\111\116 \099\104\097\110\103\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Set(1,1))).to.equal(false)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(function()E:Set(2,2)end)).to.throw("\073\110\100\101\120 \'\050\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)it("\115\104\111\117\108\100 \115\101\116 \097\110 \105\116\101\109 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3,4,5})E:Set(3,6);(expect(E:Get(3))).to.equal(6);(expect(E:Count())).to.equal(5)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \099\104\097\110\103\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2;3;4,5});(expect(E:Set(3,6))).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \110\111\116 \099\104\097\110\103\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3,4;5});(expect(E:Set(3,3))).to.equal(false)end)it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \111\117\116 \111\102 \098\111\117\110\100\115 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3;4,5});(expect(function()E:Set(6,6)end)).to.throw("\073\110\100\101\120 \'\054\' \105\115 \111\117\116 \111\102 \098\111\117\110\100\115\046")end)end)describe("\083\104\105\102\116",function()it("\115\104\111\117\108\100 \101\114\114\111\114 \119\104\101\110 \101\109\112\116\121",function()local E=p.new();(expect(function()E:Shift()end)).to.throw("\078\111 \102\105\114\115\116 \101\108\101\109\101\110\116 \101\120\105\115\116\115\046")end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \105\116\101\109 \102\114\111\109 \116\104\101 \098\101\103\105\110\110\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Shift();(expect(E:Count())).to.equal(0)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \101\108\101\109\101\110\116 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1});(expect(E:Shift())).to.equal(1)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \105\116\101\109 \102\114\111\109 \116\104\101 \098\101\103\105\110\110\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2,3,4;5})E:Shift();(expect(E:First())).to.equal(2);(expect(E:Count())).to.equal(4)end)it("\115\104\111\117\108\100 \103\101\116 \116\104\101 \101\108\101\109\101\110\116 \119\104\101\110 \114\101\109\111\118\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1,2;3;4;5});(expect(E:Shift())).to.equal(1)end)end)describe("\085\110\115\104\105\102\116",function()it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \098\101\103\105\110\110\105\110\103 \119\104\101\110 \101\109\112\116\121",function()local E=p.new()E:Unshift(1);(expect(E:First())).to.equal(1);(expect(E:Count())).to.equal(1)end)it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \098\101\103\105\110\110\105\110\103 \119\105\116\104 \111\110\101 \101\108\101\109\101\110\116",function()local E=p.new({1})E:Unshift(2);(expect(E:First())).to.equal(2);(expect(E:Count())).to.equal(2)end)it("\115\104\111\117\108\100 \097\100\100 \097\110 \105\116\101\109 \116\111 \116\104\101 \098\101\103\105\110\110\105\110\103 \119\105\116\104 \109\097\110\121 \101\108\101\109\101\110\116\115",function()local E=p.new({1;2,3,4,5})E:Unshift(6);(expect(E:First())).to.equal(6);(expect(E:Count())).to.equal(6)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101",function()local E=p.new({1,2,3,4,5});(expect(E:Unshift(6))).to.equal(true)end)end)end)end)end
--- Tests for the @{LinkedList} class.

return function()
	local module = game:GetService("ReplicatedStorage").Packages.Monolith
	local LinkedList = require(module.LinkedList)

	describe("Constructor", function()
		it("should create an empty LinkedList", function()
			local list = LinkedList.new()
			expect(list:Empty()).to.equal(true)
		end)

		it("should create a LinkedList from a table", function()
			local items = { 1, 2, 3, 4, 5 }
			local list = LinkedList.new(items)
			expect(list:Count()).to.equal(#items)
			for i, v in ipairs(items) do
				expect(list:Get(i)).to.equal(v)
			end
		end)

		it("should create a LinkedList from a Collection", function()
			local items = LinkedList.new({ 1, 2, 3, 4, 5 })
			local list = LinkedList.new(items)
			expect(list:Count()).to.equal(items:Count())
			for i, v in items:Enumerator() do
				expect(list:Get(i)).to.equal(v)
			end
		end)

		it("should error when attempting to create a LinkedList from a non-table", function()
			expect(function()
				LinkedList.new(true)
			end).to.throw("Cannot construct LinkedList from type boolean.")
			expect(function()
				LinkedList.new(1)
			end).to.throw("Cannot construct LinkedList from type number.")
			expect(function()
				LinkedList.new("string")
			end).to.throw("Cannot construct LinkedList from type string.")
			expect(function()
				LinkedList.new(function() end)
			end).to.throw("Cannot construct LinkedList from type function.")
			expect(function()
				LinkedList.new(Instance.new("Folder"))
			end).to.throw("Cannot construct LinkedList from type userdata.")
			expect(function()
				LinkedList.new(coroutine.create(function() end))
			end).to.throw("Cannot construct LinkedList from type thread.")
		end)
	end)

	describe("Enumerable Interface", function()
		describe("Enumerator", function()
			it("should provide an iterator generator", function()
				local list = LinkedList.new()
				local generator = list:Enumerator()
				expect(generator).to.be.a("function")
			end)

			it("should enumerate in a generic for loop", function()
				local list = LinkedList.new()
				local total = 10
				for i = 1, total do
					list:Add(i)
				end

				local count = 0
				for i, v in list:Enumerator() do
					count = count + 1
					expect(i).to.be.a("number")
					expect(v).to.be.a("number")
				end

				expect(count).to.equal(total)
			end)
		end)
	end)

	describe("Collection Interface", function()
		describe("Required Methods", function()
			describe("Contains", function()
				it("should not find any element when empty", function()
					local list = LinkedList.new()
					expect(list:Contains(0)).to.equal(false)
				end)

				it("should find an element when that element exists", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Contains(1)).to.equal(true)
				end)

				it("should not find an element when that element does not exist", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Contains(0)).to.equal(false)
				end)

				it("should not find an element until it is added", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Contains(0)).to.equal(false)
					list:Add(0)
					expect(list:Contains(0)).to.equal(true)
				end)

				it("should no longer find an element when its removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Contains(1)).to.equal(true)
					list:Remove(1)
					expect(list:Contains(1)).to.equal(false)
				end)
			end)

			describe("ContainsAll", function()
				it("should not find any element when empty", function()
					local list = LinkedList.new()
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAll(contained)).to.equal(false)
				end)

				it("should find all zero elements when the provided Collection is empty", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new()
					expect(list:ContainsAll(contained)).to.equal(true)
				end)

				it("should find all elements when all of the elements exist", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAll(contained)).to.equal(true)
				end)

				it("should find one element when it exists", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new({ 3 })
					expect(list:ContainsAll(contained)).to.equal(true)
				end)

				it("should not find all elements when one does not exist", function()
					local list = LinkedList.new({ 1, 2, 4, 5 })
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAll(contained)).to.equal(false)
				end)

				it("should not find one element when it does not exist", function()
					local list = LinkedList.new({ 1, 2, 4, 5 })
					local contained = LinkedList.new({ 3 })
					expect(list:ContainsAll(contained)).to.equal(false)
				end)

				it("should not find all elements until they are added", function()
					local list = LinkedList.new()
					local contained = LinkedList.new({ 1, 2 })
					expect(list:ContainsAll(contained)).to.equal(false)
					list:Add(1)
					expect(list:ContainsAll(contained)).to.equal(false)
					list:Add(2)
					expect(list:ContainsAll(contained)).to.equal(true)
				end)

				it("should no longer find all elements when they are removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAll(contained)).to.equal(true)
					list:Remove(1)
					expect(list:ContainsAll(contained)).to.equal(false)
				end)
			end)

			describe("ContainsAny", function()
				it("should not find any element when empty", function()
					local list = LinkedList.new()
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAny(contained)).to.equal(false)
				end)

				it("should not find any element when the provided Collection is empty", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new()
					expect(list:ContainsAny(contained)).to.equal(false)
				end)

				it("should find all elements when the elements exist", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAny(contained)).to.equal(true)
				end)

				it("should find one element when it exists", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new({ 3 })
					expect(list:ContainsAny(contained)).to.equal(true)
				end)

				it("should find some elements when only one does not exist", function()
					local list = LinkedList.new({ 1, 2, 4, 5 })
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAny(contained)).to.equal(true)
				end)

				it("should not find one element when it does not exist", function()
					local list = LinkedList.new({ 1, 2, 4, 5 })
					local contained = LinkedList.new({ 3 })
					expect(list:ContainsAny(contained)).to.equal(false)
				end)

				it("should not find elements until they are added", function()
					local list = LinkedList.new()
					local contained = LinkedList.new({ 1, 2 })
					expect(list:ContainsAny(contained)).to.equal(false)
					list:Add(1)
					expect(list:ContainsAny(contained)).to.equal(true)
				end)

				it("should no longer find all elements when they are all removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local contained = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:ContainsAny(contained)).to.equal(true)
					list:Remove(1)
					expect(list:ContainsAny(contained)).to.equal(true)
					list:Clear()
					expect(list:ContainsAny(contained)).to.equal(false)
				end)
			end)

			describe("Count", function()
				it("should count zero when empty", function()
					local list = LinkedList.new()
					expect(list:Count()).to.equal(0)
				end)

				it("should count the number of elements in the LinkedList", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Count()).to.equal(5)
				end)

				it("should count new elements when they are added", function()
					local list = LinkedList.new()
					local total = 10
					expect(list:Count()).to.equal(0)
					for i = 1, total do
						list:Add(i)
						expect(list:Count()).to.equal(i)
					end
					expect(list:Count()).to.equal(total)
				end)

				it("should not count elements after they are removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local count = list:Count()
					expect(count).to.equal(5)
					while count > 0 do
						list:Pop()
						local oldCount = count
						count = list:Count()
						expect(count).to.equal(oldCount - 1)
					end
				end)

				it("should count zero after being cleared", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Count()).to.equal(5)
					list:Clear()
					expect(list:Count()).to.equal(0)
				end)
			end)

			describe("Empty", function()
				it("should be empty when instantiated", function()
					local list = LinkedList.new()
					expect(list:Empty()).to.equal(true)
				end)

				it("should not be empty with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Empty()).to.equal(false)
				end)

				it("should not be empty with multiple elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Empty()).to.equal(false)
				end)

				it("should no longer be empty after an element is added", function()
					local list = LinkedList.new()
					expect(list:Empty()).to.equal(true)
					list:Add(1)
					expect(list:Empty()).to.equal(false)
				end)

				it("should be empty after all elements are removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local count = list:Count()
					while count > 0 do
						expect(list:Empty()).to.equal(false)
						list:Pop()
						count = list:Count()
					end
					expect(list:Empty()).to.equal(true)
				end)

				it("should be empty after being cleared", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Empty()).to.equal(false)
					list:Clear()
					expect(list:Empty()).to.equal(true)
				end)
			end)

			describe("ToArray", function()
				it("should return a table", function()
					local list = LinkedList.new()
					expect(list:ToArray()).to.be.a("table")
				end)

				it("should create a table of the same size", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(#list:ToArray()).to.equal(list:Count())
				end)

				it("should create an empty table when empty", function()
					local list = LinkedList.new()
					expect(#list:ToArray()).to.equal(0)
				end)

				it("should create a table with the same elements and order of enumeration", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local array = list:ToArray()
					expect(#array).to.equal(list:Count())
					for i, v in ipairs(array) do
						expect(v).to.equal(list:Get(i))
					end
				end)

				it("should provide only array indexable elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local array = list:ToArray()
					local count = 0
					for _ in pairs(array) do
						count = count + 1
					end
					expect(count).to.equal(#array)
				end)
			end)

			describe("ToTable", function()
				it("should provide the same representation as ToArray", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local array = list:ToArray()
					local table = list:ToTable()
					expect(table).to.be.a("table")
					expect(#table).to.equal(#array)
					for i, v in pairs(table) do
						expect(v).to.equal(array[i])
					end
				end)
			end)
		end)

		describe("Optional Methods", function()
			describe("Add", function()
				it("should add elements when empty", function()
					local list = LinkedList.new()
					list:Add(1)
					expect(list:Count()).to.equal(1)
				end)

				it("should add elements when not empty", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Add(6)
					expect(list:Count()).to.equal(6)
				end)

				it("should add elements to the end", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Add(1)
					expect(list:Last()).to.equal(1)
				end)

				it("should return true", function()
					local list = LinkedList.new()
					expect(list:Add(1)).to.equal(true)
				end)

				it("should add duplicate elements", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					list:Add(1)
					expect(list:Count()).to.equal(6)
				end)
			end)

			describe("AddAll", function()
				it("should add multiple elements when empty", function()
					local list = LinkedList.new()
					local add = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:AddAll(add)
					expect(list:Count()).to.equal(5)
				end)

				it("should add one element when empty", function()
					local list = LinkedList.new()
					local add = LinkedList.new({ 1 })
					list:AddAll(add)
					expect(list:Count()).to.equal(1)
				end)

				it("should add multiple elements when not empty", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local add = LinkedList.new({ 6, 7, 8, 9, 0 })
					list:AddAll(add)
					expect(list:Count()).to.equal(10)
				end)

				it("should add one element when not empty", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local add = LinkedList.new({ 6 })
					list:AddAll(add)
					expect(list:Count()).to.equal(6)
				end)

				it("should add multiple elements to the end", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local add = LinkedList.new({ 6, 7, 8, 9, 10 })
					list:AddAll(add)
					expect(list:Get(6)).to.equal(6)
					expect(list:Get(7)).to.equal(7)
					expect(list:Get(8)).to.equal(8)
					expect(list:Get(9)).to.equal(9)
					expect(list:Get(10)).to.equal(10)
				end)

				it("should add one element to the end", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local add = LinkedList.new({ 6 })
					list:AddAll(add)
					expect(list:Get(6)).to.equal(6)
				end)

				it("should return true when adding multiple elements", function()
					local list = LinkedList.new()
					local add = LinkedList.new({ 6, 7, 8, 9, 10 })
					expect(list:AddAll(add)).to.equal(true)
				end)

				it("should return true when adding one element", function()
					local list = LinkedList.new()
					local add = LinkedList.new({ 6 })
					expect(list:AddAll(add)).to.equal(true)
				end)

				it("should add multiple duplicate elements", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					local add = LinkedList.new({ 1, 1, 1, 1, 1 })
					list:AddAll(add)
					expect(list:Count()).to.equal(10)
				end)

				it("should add one duplicate element", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					local add = LinkedList.new({ 1 })
					list:AddAll(add)
					expect(list:Count()).to.equal(6)
				end)
			end)

			describe("Clear", function()
				it("should clear all elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Empty()).to.equal(false)
					list:Clear()
					expect(list:Empty()).to.equal(true)
				end)

				it("should clear when already empty", function()
					local list = LinkedList.new()
					list:Clear()
					expect(list:Empty()).to.equal(true)
				end)

				it("should clear with one element", function()
					local list = LinkedList.new({ 1 })
					list:Clear()
					expect(list:Empty()).to.equal(true)
				end)

				it("should clear with multiple elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Clear()
					expect(list:Empty()).to.equal(true)
				end)

				it("should clear with duplicate elements", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					list:Clear()
					expect(list:Empty()).to.equal(true)
				end)
			end)

			describe("Remove", function()
				it("should successfully attempt to remove when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Remove(1)
					end).never.to.throw()
				end)

				it("should return false when attempting to remove when empty", function()
					local list = LinkedList.new()
					expect(list:Remove(1)).to.equal(false)
				end)

				it("should remove one element", function()
					local list = LinkedList.new({ 1 })
					list:Remove(1)
					expect(list:Count()).to.equal(0)
				end)

				it("should return true when removing one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Remove(1)).to.equal(true)
				end)

				it("should remove an element from many", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Remove(3)
					expect(list:Count()).to.equal(4)
				end)

				it("should return true when removing an element from many", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Remove(3)).to.equal(true)
				end)

				it("should not remove when the element does not exist", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Remove(6)
					expect(list:Count()).to.equal(5)
				end)

				it("should return false when an element isn't removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Remove(6)).to.equal(false)
				end)

				it("should remove one element when there are duplicates", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					list:Remove(1)
					expect(list:Count()).to.equal(4)
				end)

				it("should return true when removing a duplicate", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					expect(list:Remove(1)).to.equal(true)
				end)
			end)

			describe("RemoveAll", function()
				it("should successfully attempt to remove when empty", function()
					local list = LinkedList.new()
					local remove = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:RemoveAll(remove)
					end).never.to.throw()
				end)

				it("should return false when attempting to remove when empty", function()
					local list = LinkedList.new()
					local remove = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:RemoveAll(remove)).to.equal(false)
				end)

				it("should remove one element", function()
					local list = LinkedList.new({ 1 })
					local remove = LinkedList.new({ 1 })
					list:RemoveAll(remove)
					expect(list:Count()).to.equal(0)
				end)

				it("should return true when removing one element", function()
					local list = LinkedList.new({ 1 })
					local remove = LinkedList.new({ 1 })
					expect(list:RemoveAll(remove)).to.equal(true)
				end)

				it("should remove with excess elements", function()
					local list = LinkedList.new({ 1 })
					local remove = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:RemoveAll(remove)
					expect(list:Count()).to.equal(0)
				end)

				it("should return true when removing with excess elements", function()
					local list = LinkedList.new({ 1 })
					local remove = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:RemoveAll(remove)).to.equal(true)
				end)

				it("should remove one element from many", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedList.new({ 1 })
					list:RemoveAll(remove)
					expect(list:Count()).to.equal(4)
				end)

				it("should return true when removing one element from many", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedList.new({ 1 })
					expect(list:RemoveAll(remove)).to.equal(true)
				end)

				it("should not remove when the element does not exist", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedList.new({ 0 })
					list:RemoveAll(remove)
					expect(list:Count()).to.equal(5)
				end)

				it("should return false when an element isn't removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedList.new({ 0 })
					expect(list:RemoveAll(remove)).to.equal(false)
				end)

				it("should remove multiple elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:RemoveAll(remove)
					expect(list:Count()).to.equal(0)
				end)

				it("should return true when removing multiple elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local remove = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:RemoveAll(remove)).to.equal(true)
				end)

				it("should remove only once for each occurrence of duplicate elements", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					local remove = LinkedList.new({ 1, 1, 1 })
					list:RemoveAll(remove)
					expect(list:Count()).to.equal(2)
				end)

				it("should return true when removing duplicates", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					local remove = LinkedList.new({ 1, 1, 1 })
					expect(list:RemoveAll(remove)).to.equal(true)
				end)
			end)

			describe("RetainAll", function()
				it("should successfully attempt to retain when empty", function()
					local list = LinkedList.new()
					local retain = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:RetainAll(retain)
					end).never.to.throw()
				end)

				it("should return false when retaining when empty", function()
					local list = LinkedList.new()
					local retain = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:RetainAll(retain)).to.equal(false)
				end)

				it("should retain one element", function()
					local list = LinkedList.new({ 1 })
					local retain = LinkedList.new({ 1 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(1)
				end)

				it("should return false when retaining one element", function()
					local list = LinkedList.new({ 1 })
					local retain = LinkedList.new({ 1 })
					expect(list:RetainAll(retain)).to.equal(false)
				end)

				it("should retain with excess elements to retain", function()
					local list = LinkedList.new({ 1 })
					local retain = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(1)
				end)

				it("should return false when retaining with excess elements to retain", function()
					local list = LinkedList.new({ 1 })
					local retain = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:RetainAll(retain)).to.equal(false)
				end)

				it("should not retain one element which does not match", function()
					local list = LinkedList.new({ 1 })
					local retain = LinkedList.new({ 0 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(0)
				end)

				it("should return true when not retaining one element that does not match", function()
					local list = LinkedList.new({ 1 })
					local retain = LinkedList.new({ 0 })
					expect(list:RetainAll(retain)).to.equal(true)
				end)

				it("should retain one element from many", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 3 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(1)
				end)

				it("should return true when retaining one element from many", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 3 })
					expect(list:RetainAll(retain)).to.equal(true)
				end)

				it("should retain no elements when one element does not match", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 6 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(0)
				end)

				it("should return true when not retaining one element", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 6 })
					expect(list:RetainAll(retain)).to.equal(true)
				end)

				it("should retain multiple elements when more exist", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 1, 3, 5 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(3)
				end)

				it("should return true when retaining multiple elements when more exist", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 1, 3, 5 })
					expect(list:RetainAll(retain)).to.equal(true)
				end)

				it("should retain multiple elements when attempting to retain excess elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 0, 1, 3 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(2)
				end)

				it("should return true when attemping to retain with excess elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 0, 1, 3 })
					expect(list:RetainAll(retain)).to.equal(true)
				end)

				it("should retain all elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(5)
				end)

				it("should return false when retaining all elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:RetainAll(retain)).to.equal(false)
				end)

				it("should retain all elements when attempting to retain excess", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 0, 1, 2, 3, 4, 5 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(5)
				end)

				it("should return false when attempting to retain exceess and retaining all elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local retain = LinkedList.new({ 0, 1, 2, 3, 4, 5 })
					expect(list:RetainAll(retain)).to.equal(false)
				end)

				it("should retain all duplicates", function()
					local list = LinkedList.new({ 1, 1, 2, 2, 3 })
					local retain = LinkedList.new({ 1, 2 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(4)
				end)

				it("should return true when retaining duplicates and more exist", function()
					local list = LinkedList.new({ 1, 1, 2, 2, 3 })
					local retain = LinkedList.new({ 1, 2 })
					expect(list:RetainAll(retain)).to.equal(true)
				end)

				it("should retain all duplicates when attemping to retain excess", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					local retain = LinkedList.new({ 1, 2 })
					list:RetainAll(retain)
					expect(list:Count()).to.equal(5)
				end)

				it("should return false when retaining all duplicates", function()
					local list = LinkedList.new({ 1, 1, 1, 1, 1 })
					local retain = LinkedList.new({ 1 })
					expect(list:RetainAll(retain)).to.equal(false)
				end)
			end)
		end)
	end)

	describe("List Interface", function()
		describe("Required Methods", function()
			describe("First", function()
				it("should error when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:First()
					end).to.throw("No first element exists.")
				end)

				it("should get the first element with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:First()).to.equal(1)
				end)

				it("should get the first element with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:First()).to.equal(1)
				end)

				it("should get the first element when elements are removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Shift()
					expect(list:First()).to.equal(2)
				end)

				it("should error when all elements have been removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					while list:Count() > 0 do
						list:Shift()
					end
					expect(function()
						list:First()
					end).to.throw("No first element exists.")
				end)
			end)

			describe("Get", function()
				it("should error when attempting get an element when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Get(1)
					end).to.throw("Index '1' is out of bounds.")
				end)

				it("should get an element with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Get(1)).to.equal(1)
				end)

				it("should error when out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					expect(function()
						list:Get(2)
					end).to.throw("Index '2' is out of bounds.")
				end)

				it("should get an element with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					for i = 1, list:Count() do
						expect(list:Get(i)).to.equal(i)
					end
				end)

				it("should error when out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:Get(6)
					end).to.throw("Index '6' is out of bounds.")
				end)
			end)

			describe("IndexOf", function()
				it("should return zero when empty", function()
					local list = LinkedList.new()
					expect(list:IndexOf(1)).to.equal(0)
				end)

				it("should error when providing an index when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:IndexOf(1, 1)
					end).to.throw("Index '1' is out of bounds.")
				end)

				it("should find the index with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:IndexOf(1)).to.equal(1)
				end)

				it("should return zero when the element doesn't exist with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:IndexOf(0)).to.equal(0)
				end)

				it("should accept one as a starting index with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:IndexOf(1, 1)).to.equal(1)
				end)

				it("should error when the index is out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					expect(function()
						list:IndexOf(1, 2)
					end).to.throw("Index '2' is out of bounds.")
				end)

				it("should find the index with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:IndexOf(3)).to.equal(3)
				end)

				it("should return zero when the element doesn't exist with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:IndexOf(0)).to.equal(0)
				end)

				it("should find the first index with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 3 })
					expect(list:IndexOf(3)).to.equal(3)
				end)

				it("should find the first element starting with the index provided", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 3 })
					expect(list:IndexOf(3, 4)).to.equal(5)
				end)

				it("should error when the index is out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:IndexOf(1, 6)
					end).to.throw("Index '6' is out of bounds.")
				end)
			end)

			describe("Last", function()
				it("should error when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Last()
					end).to.throw("No last element exists.")
				end)

				it("should get the last element with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Last()).to.equal(1)
				end)

				it("should get the last element with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Last()).to.equal(5)
				end)

				it("should get the last element when elements are removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Pop()
					expect(list:Last()).to.equal(4)
				end)

				it("should error when all elements have been removed", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					while list:Count() > 0 do
						list:Pop()
					end
					expect(function()
						list:Last()
					end).to.throw("No last element exists.")
				end)
			end)

			describe("LastIndexOf", function()
				it("should return zero when empty", function()
					local list = LinkedList.new()
					expect(list:LastIndexOf(1)).to.equal(0)
				end)

				it("should find the index with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:LastIndexOf(1)).to.equal(1)
				end)

				it("should return zero when the element doesn't exist with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:LastIndexOf(0)).to.equal(0)
				end)

				it("should find the index with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:LastIndexOf(3)).to.equal(3)
				end)

				it("should return zero when the element doesn't exist with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:LastIndexOf(0)).to.equal(0)
				end)

				it("should find the last index with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 3 })
					expect(list:LastIndexOf(3)).to.equal(5)
				end)
			end)

			describe("Sub", function()
				it("should error when providing the first index when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Sub(1)
					end).to.throw("Index '1' is out of bounds.")
				end)

				it("should create a sub-list with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Sub(1):Get(1)).to.equal(1)
				end)

				it("should error when the first index is out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					expect(function()
						list:Sub(2)
					end).to.throw("Index '2' is out of bounds.")
				end)

				it("should error when the last index is out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					expect(function()
						list:Sub(1, 2)
					end).to.throw("Index '2' is out of bounds.")
				end)

				it("should create a sub-list with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local sub = list:Sub(3)
					expect(sub:Count()).to.equal(3)
					expect(sub:Get(1)).to.equal(3)
					expect(sub:Get(2)).to.equal(4)
					expect(sub:Get(3)).to.equal(5)
				end)

				it("should create a sub-list with a last index and many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local sub = list:Sub(2, 4)
					expect(sub:Count()).to.equal(3)
					expect(sub:Get(1)).to.equal(2)
					expect(sub:Get(2)).to.equal(3)
					expect(sub:Get(3)).to.equal(4)
				end)

				it("should error when the first index is out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:Sub(0)
					end).to.throw("Index '0' is out of bounds.")
				end)

				it("should error when the last index is out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:Sub(1, 6)
					end).to.throw("Index '6' is out of bounds.")
				end)

				it("should error when providing a last index smaller than the first index", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:Sub(4, 2)
					end).to.throw("Last index is smaller than first index.")
				end)
			end)
		end)

		describe("Optional Methods", function()
			describe("Delete", function()
				it("should error when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Delete(1)
					end).to.throw("Index '1' is out of bounds.")
				end)

				it("should delete when there is one element", function()
					local list = LinkedList.new({ 1 })
					list:Delete(1)
					expect(list:Count()).to.equal(0)
				end)

				it("should return true", function()
					local list = LinkedList.new({ 1 })
					expect(list:Delete(1)).to.equal(true)
				end)

				it("should error when out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					expect(function()
						list:Delete(0)
					end).to.throw("Index '0' is out of bounds.")
				end)

				it("should delete when there are many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Delete(3)
					expect(list:Count()).to.equal(4)
					expect(list:Get(3)).to.equal(4)
					list:Delete(3)
					expect(list:Count()).to.equal(3)
					expect(list:Get(3)).to.equal(5)
				end)

				it("should error when out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:Delete(6)
					end).to.throw("Index '6' is out of bounds.")
				end)
			end)

			describe("Insert", function()
				it("should insert an item when empty", function()
					local list = LinkedList.new()
					list:Insert(1, 1)
					expect(list:Get(1)).to.equal(1)
				end)

				it("should error when out of bounds when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Insert(0, 1)
					end).to.throw("Index '0' is out of bounds.")
				end)

				it("should insert an item at the front with one element", function()
					local list = LinkedList.new({ 1 })
					list:Insert(1, 2)
					expect(list:Get(1)).to.equal(2)
					expect(list:Get(2)).to.equal(1)
				end)

				it("should insert an item at the back with one element", function()
					local list = LinkedList.new({ 1 })
					list:Insert(2, 2)
					expect(list:Get(1)).to.equal(1)
					expect(list:Get(2)).to.equal(2)
				end)

				it("should error when out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					expect(function()
						list:Insert(3, 2)
					end).to.throw("Index '3' is out of bounds.")
				end)

				it("should insert an item at the front with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Insert(1, 6)
					expect(list:Get(1)).to.equal(6)
					expect(list:Get(2)).to.equal(1)
					expect(list:Count()).to.equal(6)
				end)

				it("should insert an item in the middle with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Insert(3, 6)
					expect(list:Get(2)).to.equal(2)
					expect(list:Get(3)).to.equal(6)
					expect(list:Get(4)).to.equal(3)
					expect(list:Count()).to.equal(6)
				end)

				it("should insert an item at the back with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Insert(6, 6)
					expect(list:Get(5)).to.equal(5)
					expect(list:Get(6)).to.equal(6)
					expect(list:Count()).to.equal(6)
				end)

				it("should error when out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:Insert(7, 6)
					end).to.throw("Index '7' is out of bounds.")
				end)

				it("should return true", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Insert(1, 6)).to.equal(true)
				end)
			end)

			describe("InsertAll", function()
				it("should insert one item when empty", function()
					local list = LinkedList.new()
					local insert = LinkedList.new({ 6 })
					list:InsertAll(1, insert)
					expect(list:Get(1)).to.equal(6)
				end)

				it("should insert all items when empty", function()
					local list = LinkedList.new()
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					list:InsertAll(1, insert)
					expect(list:Get(1)).to.equal(6)
					expect(list:Get(2)).to.equal(7)
					expect(list:Get(3)).to.equal(8)
					expect(list:Get(4)).to.equal(9)
					expect(list:Get(5)).to.equal(10)
				end)

				it("should error when out of bounds when empty", function()
					local list = LinkedList.new()
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					expect(function()
						list:InsertAll(0, insert)
					end).to.throw("Index '0' is out of bounds.")
				end)

				it("should insert one item at the front with one element", function()
					local list = LinkedList.new({ 1 })
					local insert = LinkedList.new({ 6 })
					list:InsertAll(1, insert)
					expect(list:Get(1)).to.equal(6)
					expect(list:Get(2)).to.equal(1)
				end)

				it("should insert all items at the front with one element", function()
					local list = LinkedList.new({ 1 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					list:InsertAll(1, insert)
					expect(list:Get(1)).to.equal(6)
					expect(list:Get(2)).to.equal(7)
					expect(list:Get(3)).to.equal(8)
					expect(list:Get(4)).to.equal(9)
					expect(list:Get(5)).to.equal(10)
					expect(list:Get(6)).to.equal(1)
				end)

				it("should insert one item at the back with one element", function()
					local list = LinkedList.new({ 1 })
					local insert = LinkedList.new({ 6 })
					list:InsertAll(2, insert)
					expect(list:Get(1)).to.equal(1)
					expect(list:Get(2)).to.equal(6)
				end)

				it("should insert all items at the back with one element", function()
					local list = LinkedList.new({ 1 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					list:InsertAll(2, insert)
					expect(list:Get(1)).to.equal(1)
					expect(list:Get(2)).to.equal(6)
					expect(list:Get(3)).to.equal(7)
					expect(list:Get(4)).to.equal(8)
					expect(list:Get(5)).to.equal(9)
					expect(list:Get(6)).to.equal(10)
				end)

				it("should error when out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					expect(function()
						list:InsertAll(3, insert)
					end).to.throw("Index '3' is out of bounds.")
				end)

				it("should insert one item at the front with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6 })
					list:InsertAll(1, insert)
					expect(list:Get(1)).to.equal(6)
					expect(list:Get(2)).to.equal(1)
					expect(list:Count()).to.equal(6)
				end)

				it("should insert all items at the front with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					list:InsertAll(1, insert)
					expect(list:Get(1)).to.equal(6)
					expect(list:Get(2)).to.equal(7)
					expect(list:Get(3)).to.equal(8)
					expect(list:Get(4)).to.equal(9)
					expect(list:Get(5)).to.equal(10)
					expect(list:Get(6)).to.equal(1)
					expect(list:Count()).to.equal(10)
				end)

				it("should insert one item in the middle with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6 })
					list:InsertAll(3, insert)
					expect(list:Get(2)).to.equal(2)
					expect(list:Get(3)).to.equal(6)
					expect(list:Get(4)).to.equal(3)
					expect(list:Count()).to.equal(6)
				end)

				it("should insert all items in the middle with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					list:InsertAll(3, insert)
					expect(list:Get(2)).to.equal(2)
					expect(list:Get(3)).to.equal(6)
					expect(list:Get(4)).to.equal(7)
					expect(list:Get(5)).to.equal(8)
					expect(list:Get(6)).to.equal(9)
					expect(list:Get(7)).to.equal(10)
					expect(list:Get(8)).to.equal(3)
					expect(list:Count()).to.equal(10)
				end)

				it("should insert one item at the back with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6 })
					list:InsertAll(6, insert)
					expect(list:Get(5)).to.equal(5)
					expect(list:Get(6)).to.equal(6)
					expect(list:Count()).to.equal(6)
				end)

				it("should insert all items at the back with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					list:InsertAll(6, insert)
					expect(list:Get(5)).to.equal(5)
					expect(list:Get(6)).to.equal(6)
					expect(list:Get(7)).to.equal(7)
					expect(list:Get(8)).to.equal(8)
					expect(list:Get(9)).to.equal(9)
					expect(list:Get(10)).to.equal(10)
					expect(list:Count()).to.equal(10)
				end)

				it("should error when out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					expect(function()
						list:InsertAll(7, insert)
					end).to.throw("Index '7' is out of bounds.")
				end)

				it("should return true", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					local insert = LinkedList.new({ 6, 7, 8, 9, 10 })
					expect(list:InsertAll(1, insert)).to.equal(true)
				end)
			end)

			describe("Pop", function()
				it("should error when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Pop()
					end).to.throw("No last element exists.")
				end)

				it("should remove an item from the end with one element", function()
					local list = LinkedList.new({ 1 })
					list:Pop()
					expect(list:Count()).to.equal(0)
				end)

				it("should get the element when removing with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Pop()).to.equal(1)
				end)

				it("should remove an item from the end with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Pop()
					expect(list:Last()).to.equal(4)
					expect(list:Count()).to.equal(4)
				end)

				it("should get the element when removing with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Pop()).to.equal(5)
				end)
			end)

			describe("Push", function()
				it("should add an item to the end when empty", function()
					local list = LinkedList.new()
					list:Push(1)
					expect(list:Last()).to.equal(1)
					expect(list:Count()).to.equal(1)
				end)

				it("should add an item to the end with one element", function()
					local list = LinkedList.new({ 1 })
					list:Push(2)
					expect(list:Last()).to.equal(2)
					expect(list:Count()).to.equal(2)
				end)

				it("should add an item to the end with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Push(6)
					expect(list:Last()).to.equal(6)
					expect(list:Count()).to.equal(6)
				end)

				it("should return true", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Push(6)).to.equal(true)
				end)
			end)

			describe("Set", function()
				it("should error when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Set(1, 1)
					end).to.throw("Index '1' is out of bounds.")
				end)

				it("should set an item with one element", function()
					local list = LinkedList.new({ 1 })
					list:Set(1, 2)
					expect(list:Get(1)).to.equal(2)
					expect(list:Count()).to.equal(1)
				end)

				it("should return true when changing with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Set(1, 2)).to.equal(true)
				end)

				it("should return false when not changing with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Set(1, 1)).to.equal(false)
				end)

				it("should error when out of bounds with one element", function()
					local list = LinkedList.new({ 1 })
					expect(function()
						list:Set(2, 2)
					end).to.throw("Index '2' is out of bounds.")
				end)

				it("should set an item with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Set(3, 6)
					expect(list:Get(3)).to.equal(6)
					expect(list:Count()).to.equal(5)
				end)

				it("should return true when changing with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Set(3, 6)).to.equal(true)
				end)

				it("should return false when not changing with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Set(3, 3)).to.equal(false)
				end)

				it("should error when out of bounds with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(function()
						list:Set(6, 6)
					end).to.throw("Index '6' is out of bounds.")
				end)
			end)

			describe("Shift", function()
				it("should error when empty", function()
					local list = LinkedList.new()
					expect(function()
						list:Shift()
					end).to.throw("No first element exists.")
				end)

				it("should remove an item from the beginning with one element", function()
					local list = LinkedList.new({ 1 })
					list:Shift()
					expect(list:Count()).to.equal(0)
				end)

				it("should get the element when removing with one element", function()
					local list = LinkedList.new({ 1 })
					expect(list:Shift()).to.equal(1)
				end)

				it("should remove an item from the beginning with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Shift()
					expect(list:First()).to.equal(2)
					expect(list:Count()).to.equal(4)
				end)

				it("should get the element when removing with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Shift()).to.equal(1)
				end)
			end)

			describe("Unshift", function()
				it("should add an item to the beginning when empty", function()
					local list = LinkedList.new()
					list:Unshift(1)
					expect(list:First()).to.equal(1)
					expect(list:Count()).to.equal(1)
				end)

				it("should add an item to the beginning with one element", function()
					local list = LinkedList.new({ 1 })
					list:Unshift(2)
					expect(list:First()).to.equal(2)
					expect(list:Count()).to.equal(2)
				end)

				it("should add an item to the beginning with many elements", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					list:Unshift(6)
					expect(list:First()).to.equal(6)
					expect(list:Count()).to.equal(6)
				end)

				it("should return true", function()
					local list = LinkedList.new({ 1, 2, 3, 4, 5 })
					expect(list:Unshift(6)).to.equal(true)
				end)
			end)
		end)
	end)
end
