Skip to content

Commit

Permalink
new HV test
Browse files Browse the repository at this point in the history
  • Loading branch information
VorTechnix committed Dec 21, 2023
1 parent 855a0fd commit b3de30f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .tests/parse/axes/axes_parser.test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,20 @@ describe("parse_axes", function()
assert.are.same(Vector3.new(10, 10, 10), maxv)
end)

it("should work for h and v", function()
local minv, maxv = parse_axes({
"h", "3",
"-v", "4",
}, facing_dirs.x_pos)
assert.is.truthy(minv)
assert.are.same(Vector3.new(-3, -4, -3), minv)
assert.are.same(Vector3.new(3, 4, 3), maxv)
end)

it("should work on directions and their abriviations", function()
local minv, maxv = parse_axes({
"l", "3", -- +z
"-r", "-3", -- +z
"-right", "-3", -- +z
"b", "-10", -- -x
}, facing_dirs.x_pos)
assert.is.truthy(minv)
Expand Down Expand Up @@ -155,4 +165,4 @@ describe("parse_axes", function()
assert.are.same("string", type(maxv))
end)

end)
end)

0 comments on commit b3de30f

Please sign in to comment.