From 5d27ba9ccb3f0099a5a49d18f332293d21d536a4 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 4 Aug 2021 21:24:36 +0100 Subject: [PATCH] Vector3.new: add test to make sure Vector3.new() returns (0, 0, 0) --- .tests/Vector3/new.test.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.tests/Vector3/new.test.lua b/.tests/Vector3/new.test.lua index 54a5c72..c92e9d5 100644 --- a/.tests/Vector3/new.test.lua +++ b/.tests/Vector3/new.test.lua @@ -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)