mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-25 16:43:05 +00:00
Update tests to wea_c
This commit is contained in:
parent
2af1226b49
commit
1ae36d3898
41 changed files with 44 additions and 44 deletions
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.abs", function()
|
||||
it("should work with a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.add", function()
|
||||
it("should add 2 positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.area", function()
|
||||
it("should work with a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.ceil", function()
|
||||
it("should ceil a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.clamp", function()
|
||||
it("should work by not changing values if it's already clamped", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.clone", function()
|
||||
it("should return a new Vector3 instance", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.__concat", function()
|
||||
it("should work when concatenating a Vector3 + Vector3", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.divide", function()
|
||||
it("should divide 2 positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.dot", function()
|
||||
it("should work with a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.equals", function()
|
||||
it("should return true when identical", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.expand_region", function()
|
||||
it("should work with positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.floor", function()
|
||||
it("should floor a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.is_contained", function()
|
||||
it("should return true when inside", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
-- To find these numbers, in Javascript:
|
||||
-- function t(x) { return Math.sqrt((x*x)*3); }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.length_squared", function()
|
||||
it("should work with a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.limit_to", function()
|
||||
it("should limit_to a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.max", function()
|
||||
it("should work with positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.max_component", function()
|
||||
it("should work with a positive vector x", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.mean", function()
|
||||
it("should work with a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.min", function()
|
||||
it("should work with positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.min_component", function()
|
||||
it("should work with a positive vector x", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
-- To find these numbers, in Javascript:
|
||||
-- function t(x) { return Math.sqrt((x*x)*3); }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.multiply", function()
|
||||
it("should multiply 2 positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.add", function()
|
||||
it("should create a new Vector3", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.round", function()
|
||||
it("should round a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.set_to", function()
|
||||
it("should set_to a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.snap_to", function()
|
||||
it("should snap_to a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.sort", function()
|
||||
it("should work with positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.sqrt", function()
|
||||
it("should sqrt a positive vector", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.subtract", function()
|
||||
it("should subtract 2 positive vectors", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
describe("Vector3.__tostring", function()
|
||||
it("should stringify a Vector3", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
-- To find these numbers, in Javascript:
|
||||
-- function t(x) { return Math.sqrt((x*x)*3); }
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
local facing_dirs = dofile("./.tests/parse/axes/include_facing_dirs.lua")
|
||||
|
||||
local parse = require("worldeditadditions.utils.parse.axes_parser")
|
||||
local parse = require("worldeditadditions_core.utils.parse.axes_parser")
|
||||
local parse_axes = parse.keytable
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
local axes = require("worldeditadditions.utils.parse.axes")
|
||||
local parse_abs_axis_name = axes.parse_abs_axis_name
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
local facing_dirs = dofile("./.tests/parse/axes/include_facing_dirs.lua")
|
||||
|
||||
local axes = require("worldeditadditions.utils.parse.axes")
|
||||
local axes = require("worldeditadditions_core.utils.parse.axes")
|
||||
local parse_axes = axes.parse_axes
|
||||
|
||||
--[[ Original idea for how this function was supposed to work from @VorTechnix
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
local Vector3 = require("worldeditadditions.utils.vector3")
|
||||
local Vector3 = require("worldeditadditions_core.utils.vector3")
|
||||
|
||||
local facing_dirs = dofile("./.tests/parse/axes/include_facing_dirs.lua")
|
||||
|
||||
local axes = require("worldeditadditions.utils.parse.axes")
|
||||
local axes = require("worldeditadditions_core.utils.parse.axes")
|
||||
local parse_relative_axis_name = axes.parse_relative_axis_name
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local polyfill = require("worldeditadditions.utils.strings.polyfill")
|
||||
local polyfill = require("worldeditadditions_core.utils.strings.polyfill")
|
||||
|
||||
describe("str_ends", function()
|
||||
it("should return true for a single character", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local polyfill = require("worldeditadditions.utils.strings.polyfill")
|
||||
local polyfill = require("worldeditadditions_core.utils.strings.polyfill")
|
||||
|
||||
describe("str_padend", function()
|
||||
it("should pad a string", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local polyfill = require("worldeditadditions.utils.strings.polyfill")
|
||||
local polyfill = require("worldeditadditions_core.utils.strings.polyfill")
|
||||
|
||||
describe("str_padstart", function()
|
||||
it("should pad a string", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local polyfill = require("worldeditadditions.utils.strings.polyfill")
|
||||
local polyfill = require("worldeditadditions_core.utils.strings.polyfill")
|
||||
|
||||
describe("str_starts", function()
|
||||
it("should return true for a single character", function()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local polyfill = require("worldeditadditions.utils.strings.polyfill")
|
||||
local polyfill = require("worldeditadditions_core.utils.strings.polyfill")
|
||||
|
||||
describe("trim", function()
|
||||
it("work for a string that's already trimmed", function()
|
||||
|
|
Loading…
Reference in a new issue