mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-28 07:49:45 +00:00
update tests
This commit is contained in:
parent
9f05bdce6d
commit
fb9ab5f399
1 changed files with 10 additions and 10 deletions
|
@ -1,18 +1,18 @@
|
|||
include <../std.scad>
|
||||
|
||||
|
||||
module test_line_of() {
|
||||
assert_equal(line_of(l=100,n=5), [[-50,0,0],[-25,0,0],[0,0,0],[25,0,0],[50,0,0]]);
|
||||
assert_equal(line_of(20,n=5), [[-40,0,0],[-20,0,0],[0,0,0],[20,0,0],[40,0,0]]);
|
||||
assert_equal(line_of(spacing=20,n=5), [[-40,0,0],[-20,0,0],[0,0,0],[20,0,0],[40,0,0]]);
|
||||
assert_equal(line_of(spacing=[0,20],n=5), [[0,-40,0],[0,-20,0],[0,0,0],[0,20,0],[0,40,0]]);
|
||||
module test_line_copies() {
|
||||
assert_equal(line_copies(l=100,n=5), [[-50,0,0],[-25,0,0],[0,0,0],[25,0,0],[50,0,0]]);
|
||||
assert_equal(line_copies(20,n=5), [[-40,0,0],[-20,0,0],[0,0,0],[20,0,0],[40,0,0]]);
|
||||
assert_equal(line_copies(spacing=20,n=5), [[-40,0,0],[-20,0,0],[0,0,0],[20,0,0],[40,0,0]]);
|
||||
assert_equal(line_copies(spacing=[0,20],n=5), [[0,-40,0],[0,-20,0],[0,0,0],[0,20,0],[0,40,0]]);
|
||||
|
||||
assert_equal(line_of(p1=[0,0],l=100,n=5), [[0,0,0],[25,0,0],[50,0,0],[75,0,0],[100,0,0]]);
|
||||
assert_equal(line_of(p1=[0,0],20,n=5), [[0,0,0],[20,0,0],[40,0,0],[60,0,0],[80,0,0]]);
|
||||
assert_equal(line_of(p1=[0,0],spacing=20,n=5), [[0,0,0],[20,0,0],[40,0,0],[60,0,0],[80,0,0]]);
|
||||
assert_equal(line_of(p1=[0,0],spacing=[0,20],n=5), [[0,0,0],[0,20,0],[0,40,0],[0,60,0],[0,80,0]]);
|
||||
assert_equal(line_copies(p1=[0,0],l=100,n=5), [[0,0,0],[25,0,0],[50,0,0],[75,0,0],[100,0,0]]);
|
||||
assert_equal(line_copies(p1=[0,0],20,n=5), [[0,0,0],[20,0,0],[40,0,0],[60,0,0],[80,0,0]]);
|
||||
assert_equal(line_copies(p1=[0,0],spacing=20,n=5), [[0,0,0],[20,0,0],[40,0,0],[60,0,0],[80,0,0]]);
|
||||
assert_equal(line_copies(p1=[0,0],spacing=[0,20],n=5), [[0,0,0],[0,20,0],[0,40,0],[0,60,0],[0,80,0]]);
|
||||
}
|
||||
test_line_of();
|
||||
test_line_copies();
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue