local w=require(script.Parent.Parent.Util.BasicallyIdentical)return function()local u=require(script.Parent)describe("\116\111\073\110\116\040\046\046\046\041",function()it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116 \105\115 \110\111\116 \097 \067\111\108\111\114\051",function()(expect(pcall(u.toInt,true))).to.equal(false)end)it("\099\111\110\118\101\114\116\115 \097 \067\111\108\111\114\051 \116\111 \097\110 \105\110\116\101\103\101\114",function()(expect(u.toInt(Color3.new()))).to.equal(0);(expect(u.toInt(Color3.fromRGB(0,162,255)))).to.equal(41727);(expect(u.toInt(Color3.new(1,1,1)))).to.equal(16777215)end)end)describe("\102\114\111\109\073\110\116\040\046\046\046\041",function()it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116 \105\115 \110\111\116 \097 \110\117\109\098\101\114",function()(expect(pcall(u.fromInt,true))).to.equal(false)end)it("\099\111\110\118\101\114\116\115 \097 \110\117\109\098\101\114 \116\111 \067\111\108\111\114\051",function()(expect(w(Color3.new(),u.fromInt(0)))).to.equal(true);(expect(w(Color3.fromRGB(0,162,255),u.fromInt(41727)))).to.equal(true);(expect(w(Color3.new(1,1,1),u.fromInt(16777215)))).to.equal(true)end)end)end
local BasicallyIdentical = require(script.Parent.Parent.Util.BasicallyIdentical)

return function()
	local Int = require(script.Parent)

	describe("toInt(...)", function()
		it("throws if argument is not a Color3", function()
			expect(pcall(Int.toInt, true)).to.equal(false)
		end)

		it("converts a Color3 to an integer", function()
			expect(Int.toInt(Color3.new())).to.equal(0)
			expect(Int.toInt(Color3.fromRGB(0, 162, 255))).to.equal(0x00A2FF)
			expect(Int.toInt(Color3.new(1, 1, 1))).to.equal(0xFFFFFF)
		end)
	end)

	describe("fromInt(...)", function()
		it("throws if argument is not a number", function()
			expect(pcall(Int.fromInt, true)).to.equal(false)
		end)

		it("converts a number to Color3", function()
			expect(BasicallyIdentical(Color3.new(), Int.fromInt(0))).to.equal(true)
			expect(BasicallyIdentical(Color3.fromRGB(0, 162, 255), Int.fromInt(0x00A2FF))).to.equal(true)
			expect(BasicallyIdentical(Color3.new(1, 1, 1), Int.fromInt(0xFFFFFF))).to.equal(true)
		end)
	end)
end
