return function()local z=require(script.Parent)local function p(z)local p=typeof(z)if p=="\116\097\098\108\101"then local K=getmetatable(z)if type(K)=="\116\097\098\108\101"then local z=K.__type or K.ClassName if z then return z else return p end else return p end else return p end end describe("\077\105\110\080\114\105\111\114\105\116\121\081\117\101\117\101\046\110\101\119",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \077\105\110\080\114\105\111\114\105\116\121\081\117\101\117\101",function()(expect(p(z.new()))).to.equal("\077\105\110\080\114\105\111\114\105\116\121\081\117\101\117\101")end)end)describe("\077\105\110\080\114\105\111\114\105\116\121\081\117\101\117\101\058\073\115\069\109\112\116\121",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \098\111\111\108\101\097\110",function()(expect((z.new()):IsEmpty())).to.be.a("\098\111\111\108\101\097\110")end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \105\102 \101\109\112\116\121",function()(expect((z.new()):IsEmpty())).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \105\102 \110\111\116 \101\109\112\116\121",function()local p=z.new()p:InsertWithPriority("\086\097\108\117\101",1);(expect(p:IsEmpty())).to.equal(false)end)end)describe("\077\105\110\080\114\105\111\114\105\116\121\081\117\101\117\101\058\073\110\115\101\114\116\087\105\116\104\080\114\105\111\114\105\116\121",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \110\117\109\098\101\114",function()(expect((z.new()):InsertWithPriority("\049",1))).to.be.a("\110\117\109\098\101\114")end)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \105\110\116\111 \116\104\101 \112\114\111\112\101\114 \108\111\099\097\116\105\111\110",function()local p=z.new()p:InsertWithPriority("\050",2)p:InsertWithPriority("\051",3);(expect(p:InsertWithPriority("\049",1))).to.equal(3)end)end)describe("\077\105\110\080\114\105\111\114\105\116\121\081\117\101\117\101\058\067\104\097\110\103\101\080\114\105\111\114\105\116\121",function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \110\117\109\098\101\114",function()local p=z.new()p:InsertWithPriority("\049",4)p:InsertWithPriority("\050",2)p:InsertWithPriority("\051",3);(expect(p:ChangePriority("\049",1))).to.be.a("\110\117\109\098\101\114")end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\104\101 \099\111\114\114\101\099\116 \112\111\115\105\116\105\111\110",function()local p=z.new()p:InsertWithPriority("\049",4)p:InsertWithPriority("\050",2)p:InsertWithPriority("\051",3);(expect(p:ChangePriority("\049",1))).to.equal(3)end)it("\115\104\111\117\108\100 \116\104\114\111\119 \105\102 \116\104\101 \112\097\115\115\101\100 \118\097\108\117\101 \105\115 \110\117\108\108",function()(expect(function()(z.new()):ChangePriority("\049",1)end)).to.throw()end)end)end
return function()
	local MinPriorityQueue = require(script.Parent)

	local function TypeOf(Value)
		local ValueType = typeof(Value)
		if ValueType == "table" then
			local Metatable = getmetatable(Value)
			if type(Metatable) == "table" then
				local CustomType = Metatable.__type or Metatable.ClassName
				if CustomType then
					return CustomType
				else
					return ValueType
				end
			else
				return ValueType
			end
		else
			return ValueType
		end
	end

	describe("MinPriorityQueue.new", function()
		it("should return a MinPriorityQueue", function()
			expect(TypeOf(MinPriorityQueue.new())).to.equal("MinPriorityQueue")
		end)
	end)

	describe("MinPriorityQueue:IsEmpty", function()
		it("should return a boolean", function()
			expect(MinPriorityQueue.new():IsEmpty()).to.be.a("boolean")
		end)

		it("should return true if empty", function()
			expect(MinPriorityQueue.new():IsEmpty()).to.equal(true)
		end)

		it("should return false if not empty", function()
			local PriorityQueue = MinPriorityQueue.new()
			PriorityQueue:InsertWithPriority("Value", 1)
			expect(PriorityQueue:IsEmpty()).to.equal(false)
		end)
	end)

	describe("MinPriorityQueue:InsertWithPriority", function()
		it("should return a number", function()
			expect(MinPriorityQueue.new():InsertWithPriority("1", 1)).to.be.a("number")
		end)

		it("should insert into the proper location", function()
			local PriorityQueue = MinPriorityQueue.new()
			PriorityQueue:InsertWithPriority("2", 2)
			PriorityQueue:InsertWithPriority("3", 3)
			expect(PriorityQueue:InsertWithPriority("1", 1)).to.equal(3)
		end)
	end)

	describe("MinPriorityQueue:ChangePriority", function()
		it("should return a number", function()
			local PriorityQueue = MinPriorityQueue.new()
			PriorityQueue:InsertWithPriority("1", 4)
			PriorityQueue:InsertWithPriority("2", 2)
			PriorityQueue:InsertWithPriority("3", 3)
			expect(PriorityQueue:ChangePriority("1", 1)).to.be.a("number")
		end)

		it("should return the correct position", function()
			local PriorityQueue = MinPriorityQueue.new()
			PriorityQueue:InsertWithPriority("1", 4)
			PriorityQueue:InsertWithPriority("2", 2)
			PriorityQueue:InsertWithPriority("3", 3)
			expect(PriorityQueue:ChangePriority("1", 1)).to.equal(3)
		end)

		it("should throw if the passed value is null", function()
			expect(function()
				MinPriorityQueue.new():ChangePriority("1", 1)
			end).to.throw()
		end)
	end)

	-- describe("LinkedList::Prepend", function()
	-- 	it("should throw if the argument passed is not a LinkedList", function()
	-- 		expect(function()
	-- 			MinPriorityQueue.new():Prepend(1)
	-- 		end).to.throw()
	-- 	end)

	-- 	it("should push a LinkedList to the start of the list", function()
	-- 		local List = MinPriorityQueue.new {3, 4}
	-- 		List:Prepend(MinPriorityQueue.new {1, 2})
	-- 		expect(List.Length).to.equal(4)
	-- 		expect(tostring(List)).to.equal("[1, 2, 3, 4]")
	-- 	end)
	-- end)
end
