local T=require(script.Parent.Util.BasicallyIdentical)return function()local Z=require(script.Parent.Rotate)local r=require(script.Parent.Invert)it("\116\104\114\111\119\115 \105\102 \097\114\103\117\109\101\110\116\115 \097\114\101 \105\110\118\097\108\105\100 \116\121\112\101\115",function()(expect(pcall(Z,true))).to.equal(false);(expect(pcall(Z,Color3.new(),false))).to.equal(false)end)it("\099\097\110 \114\111\116\097\116\101 \097 \099\111\108\111\114 \049\056\048\100\101\103 \116\111 \114\101\099\101\105\118\101 \116\104\101 \105\110\118\101\114\115\101",function()local T=Color3.fromRGB(0,162,255)local i=(r(T)):ToHSV()local e=(Z(T,180)):ToHSV();(expect(i)).to.be.near(e,.001)end)it("\099\097\110 \114\111\116\097\116\101 \097 \099\111\108\111\114 \051\054\048\100\101\103 \116\111 \114\101\099\101\105\118\101 \116\104\101 \115\097\109\101 \099\111\108\111\114",function()local r=Color3.new(0,1,1)local i=Z(r,360);(expect(T(r,i))).to.equal(true)end)end
local BasicallyIdentical = require(script.Parent.Util.BasicallyIdentical)

return function()
	local Rotate = require(script.Parent.Rotate)
	local Invert = require(script.Parent.Invert)

	it("throws if arguments are invalid types", function()
		expect(pcall(Rotate, true)).to.equal(false)
		expect(pcall(Rotate, Color3.new(), false)).to.equal(false)
	end)

	it("can rotate a color 180deg to receive the inverse", function()
		local color = Color3.fromRGB(0, 162, 255)

		local inverseHue = Invert(color):ToHSV()
		local rotatedHue = Rotate(color, 180):ToHSV()

		expect(inverseHue).to.be.near(rotatedHue, 0.001)
	end)

	it("can rotate a color 360deg to receive the same color", function()
		local color = Color3.new(0, 1, 1)
		local result = Rotate(color, 360)

		expect(BasicallyIdentical(color, result)).to.equal(true)
	end)
end
