Vector3.new: add test to make sure Vector3.new() returns (0, 0, 0)

This commit is contained in:
Starbeamrainbowlabs 2021-08-04 21:24:36 +01:00
parent c48e9f2ab8
commit 5d27ba9ccb
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2

@ -7,6 +7,12 @@ describe("Vector3.add", function()
Vector3.new(3, 4, 5)
)
end)
it("should default to (0, 0, 0)", function()
assert.are.same(
{ x = 0, y = 0, z = 0 },
Vector3.new()
)
end)
it("should not throw an error on invalid x", function()
assert.has_no.errors(function()
Vector3.new("cheese", 4, 5)