mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-31 05:10:07 +02:00
Fixed a bunch of undef math warnings with dev snapshot OpenSCAD builds.
This commit is contained in:
@@ -72,8 +72,7 @@ test_constrain();
|
||||
|
||||
module test_is_matrix() {
|
||||
assert(is_matrix([[2,3,4],[5,6,7],[8,9,10]]));
|
||||
assert(is_matrix([[2,3,4],[5,6,7],[8,9,10]],square=true));
|
||||
assert(is_matrix([[2,3,4],[5,6,7],[8,9,10]],square=false));
|
||||
assert(is_matrix([[2,3],[5,6],[8,9]],3,2));
|
||||
assert(is_matrix([[2,3],[5,6],[8,9]],m=3,n=2));
|
||||
assert(is_matrix([[2,3,4],[5,6,7]],m=2,n=3));
|
||||
assert(is_matrix([[2,3,4],[5,6,7]],2,3));
|
||||
@@ -82,8 +81,6 @@ module test_is_matrix() {
|
||||
assert(is_matrix([[2,3,4],[5,6,7]],n=3));
|
||||
assert(!is_matrix([[2,3,4],[5,6,7]],m=4));
|
||||
assert(!is_matrix([[2,3,4],[5,6,7]],n=5));
|
||||
assert(!is_matrix([[2,3,4],[5,6,7]],m=2,n=3,square=true));
|
||||
assert(is_matrix([[2,3,4],[5,6,7],[8,9,10]],square=false));
|
||||
assert(!is_matrix([[2,3],[5,6],[8,9]],m=2,n=3));
|
||||
assert(!is_matrix([[2,3,4],[5,6,7]],m=3,n=2));
|
||||
assert(!is_matrix(undef));
|
||||
@@ -688,10 +685,10 @@ module test_count_true() {
|
||||
assert_equal(count_true([1,false,undef]), 1);
|
||||
assert_equal(count_true([1,5,false]), 2);
|
||||
assert_equal(count_true([1,5,true]), 3);
|
||||
assert_equal(count_true([[0,0], [0,0]]), 0);
|
||||
assert_equal(count_true([[0,0], [1,0]]), 1);
|
||||
assert_equal(count_true([[1,1], [1,1]]), 4);
|
||||
assert_equal(count_true([[1,1], [1,1]], nmax=3), 3);
|
||||
assert_equal(count_true([[0,0], [0,0]]), 2);
|
||||
assert_equal(count_true([[0,0], [1,0]]), 2);
|
||||
assert_equal(count_true([[1,1], [1,1]]), 2);
|
||||
assert_equal(count_true([1,1,1,1,1], nmax=3), 3);
|
||||
}
|
||||
test_count_true();
|
||||
|
||||
|
Reference in New Issue
Block a user