mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 00:53:00 +00:00
Vector3.new: add test to make sure Vector3.new() returns (0, 0, 0)
This commit is contained in:
parent
c48e9f2ab8
commit
5d27ba9ccb
1 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,12 @@ describe("Vector3.add", function()
|
||||||
Vector3.new(3, 4, 5)
|
Vector3.new(3, 4, 5)
|
||||||
)
|
)
|
||||||
end)
|
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()
|
it("should not throw an error on invalid x", function()
|
||||||
assert.has_no.errors(function()
|
assert.has_no.errors(function()
|
||||||
Vector3.new("cheese", 4, 5)
|
Vector3.new("cheese", 4, 5)
|
||||||
|
|
Loading…
Reference in a new issue