mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Completed arrays.scad regressions.
This commit is contained in:
parent
cdcc39ea16
commit
f8f015758a
2 changed files with 14 additions and 4 deletions
|
@ -129,11 +129,11 @@ module test_bselect() {
|
||||||
test_bselect();
|
test_bselect();
|
||||||
|
|
||||||
|
|
||||||
module test_bset() {
|
module test_list_bset() {
|
||||||
assert(list_bset([false,true,false,true,false], [3,4]) == [0,3,0,4,0]);
|
assert(list_bset([false,true,false,true,false], [3,4]) == [0,3,0,4,0]);
|
||||||
assert(list_bset([false,true,false,true,false], [3,4], dflt=1) == [1,3,1,4,1]);
|
assert(list_bset([false,true,false,true,false], [3,4], dflt=1) == [1,3,1,4,1]);
|
||||||
}
|
}
|
||||||
test_bset();
|
test_list_bset();
|
||||||
|
|
||||||
|
|
||||||
module test_list_increasing() {
|
module test_list_increasing() {
|
||||||
|
@ -206,7 +206,17 @@ module test_enumerate() {
|
||||||
test_enumerate();
|
test_enumerate();
|
||||||
|
|
||||||
|
|
||||||
// TODO: Add tests for shuffle()
|
module test_shuffle() {
|
||||||
|
nums1 = [for (i=list_range(100)) i];
|
||||||
|
nums2 = shuffle(nums1);
|
||||||
|
nums3 = shuffle(nums2);
|
||||||
|
assert(len(nums2)==len(nums1));
|
||||||
|
assert(len(nums3)==len(nums2));
|
||||||
|
assert(nums1!=nums2);
|
||||||
|
assert(nums2!=nums3);
|
||||||
|
assert(nums1!=nums3);
|
||||||
|
}
|
||||||
|
test_shuffle();
|
||||||
|
|
||||||
|
|
||||||
module test_sort() {
|
module test_sort() {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,12];
|
BOSL_VERSION = [2,0,13];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue