mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-22 16:23:48 +02:00
misc tweaks
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
include <test_affine.scad>
|
||||
include <test_attachments.scad>
|
||||
include <test_comparisons.scad>
|
||||
include <test_coords.scad>
|
||||
include <test_cubetruss.scad>
|
||||
include <test_distributors.scad>
|
||||
include <test_drawing.scad>
|
||||
include <test_edges.scad>
|
||||
include <test_fnliterals.scad>
|
||||
include <test_geometry.scad>
|
||||
include <test_hull.scad>
|
||||
include <test_linalg.scad>
|
||||
include <test_linear_bearings.scad>
|
||||
include <test_lists.scad>
|
||||
include <test_math.scad>
|
||||
include <test_mutators.scad>
|
||||
include <test_paths.scad>
|
||||
include <test_quaternions.scad>
|
||||
include <test_regions.scad>
|
||||
include <test_rounding.scad>
|
||||
include <test_screw_drive.scad>
|
||||
include <test_shapes2d.scad>
|
||||
include <test_shapes3d.scad>
|
||||
include <test_skin.scad>
|
||||
include <test_strings.scad>
|
||||
include <test_structs.scad>
|
||||
include <test_transforms.scad>
|
||||
include <test_trigonometry.scad>
|
||||
include <test_utility.scad>
|
||||
include <test_vectors.scad>
|
||||
include <test_version.scad>
|
||||
include <test_vnf.scad>
|
@@ -391,3 +391,19 @@ module test_compare_lists() {
|
||||
}
|
||||
test_compare_lists();
|
||||
|
||||
|
||||
|
||||
module test_min_index() {
|
||||
assert(min_index([5,3,9,6,2,7,8,2,1])==8);
|
||||
assert(min_index([5,3,9,6,2,7,8,2,7],all=true)==[4,7]);
|
||||
}
|
||||
test_min_index();
|
||||
|
||||
|
||||
module test_max_index() {
|
||||
assert(max_index([5,3,9,6,2,7,8,9,1])==2);
|
||||
assert(max_index([5,3,9,6,2,7,8,9,7],all=true)==[2,7]);
|
||||
}
|
||||
test_max_index();
|
||||
|
||||
|
||||
|
@@ -241,22 +241,6 @@ module test_list_pad() {
|
||||
test_list_pad();
|
||||
|
||||
|
||||
module test_list_trim() {
|
||||
assert(list_trim([4,5,6], 5) == [4,5,6]);
|
||||
assert(list_trim([4,5,6,7,8], 5) == [4,5,6,7,8]);
|
||||
assert(list_trim([3,4,5,6,7,8,9], 5) == [3,4,5,6,7]);
|
||||
}
|
||||
test_list_trim();
|
||||
|
||||
|
||||
module test_list_fit() {
|
||||
assert(list_fit([4,5,6], 5, 8) == [4,5,6,8,8]);
|
||||
assert(list_fit([4,5,6,7,8], 5, 8) == [4,5,6,7,8]);
|
||||
assert(list_fit([3,4,5,6,7,8,9], 5, 8) == [3,4,5,6,7]);
|
||||
}
|
||||
test_list_fit();
|
||||
|
||||
|
||||
module test_idx() {
|
||||
colors = ["red", "green", "blue", "cyan"];
|
||||
assert([for (i=idx(colors)) i] == [0,1,2,3]);
|
||||
@@ -327,13 +311,6 @@ test_set_intersection();
|
||||
|
||||
// Arrays
|
||||
|
||||
module test_add_scalar() {
|
||||
assert(add_scalar([1,2,3],3) == [4,5,6]);
|
||||
assert(add_scalar([[1,2,3],[3,4,5]],3) == [[4,5,6],[6,7,8]]);
|
||||
}
|
||||
test_add_scalar();
|
||||
|
||||
|
||||
|
||||
module test_force_list() {
|
||||
assert_equal(force_list([3,4,5]), [3,4,5]);
|
||||
|
@@ -242,19 +242,10 @@ module test_vector_nearest(){
|
||||
test_vector_nearest();
|
||||
|
||||
|
||||
|
||||
module test_min_index() {
|
||||
assert(min_index([5,3,9,6,2,7,8,2,1])==8);
|
||||
assert(min_index([5,3,9,6,2,7,8,2,7],all=true)==[4,7]);
|
||||
module test_add_scalar() {
|
||||
assert(add_scalar([1,2,3],3) == [4,5,6]);
|
||||
}
|
||||
test_min_index();
|
||||
|
||||
|
||||
module test_max_index() {
|
||||
assert(max_index([5,3,9,6,2,7,8,9,1])==2);
|
||||
assert(max_index([5,3,9,6,2,7,8,9,7],all=true)==[2,7]);
|
||||
}
|
||||
test_max_index();
|
||||
test_add_scalar();
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user