mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-16 16:44:18 +02:00
Correction of is_vector and doc text
This commit is contained in:
@@ -3,6 +3,14 @@ include <../std.scad>
|
||||
|
||||
// Section: List Query Operations
|
||||
|
||||
module test_is_simple_list() {
|
||||
assert(is_simple_list([1,2,3,4]));
|
||||
assert(is_simple_list([]));
|
||||
assert(!is_simple_list([1,2,[3,4]]));
|
||||
}
|
||||
test_is_simple_list();
|
||||
|
||||
|
||||
module test_select() {
|
||||
l = [3,4,5,6,7,8,9];
|
||||
assert(select(l, 5, 6) == [8,9]);
|
||||
@@ -434,10 +442,18 @@ test_array_group();
|
||||
|
||||
module test_flatten() {
|
||||
assert(flatten([[1,2,3], [4,5,[6,7,8]]]) == [1,2,3,4,5,[6,7,8]]);
|
||||
assert(flatten([]) == []);
|
||||
}
|
||||
test_flatten();
|
||||
|
||||
|
||||
module test_full_flatten() {
|
||||
assert(full_flatten([[1,2,3], [4,5,[6,[7],8]]]) == [1,2,3,4,5,6,7,8]);
|
||||
assert(full_flatten([]) == []);
|
||||
}
|
||||
test_full_flatten();
|
||||
|
||||
|
||||
module test_array_dim() {
|
||||
assert(array_dim([[[1,2,3],[4,5,6]],[[7,8,9],[10,11,12]]]) == [2,2,3]);
|
||||
assert(array_dim([[[1,2,3],[4,5,6]],[[7,8,9],[10,11,12]]], 0) == 2);
|
||||
|
Reference in New Issue
Block a user