mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-03 13:33:27 +02:00
Rename close_path and cleanup_path to list_wrap and list_unwrap
This commit is contained in:
@@ -81,6 +81,26 @@ test_unique_count();
|
||||
|
||||
|
||||
|
||||
|
||||
module test_list_wrap() {
|
||||
assert(list_wrap([[1,2,3],[4,5,6],[1,8,9]]) == [[1,2,3],[4,5,6],[1,8,9],[1,2,3]]);
|
||||
assert(list_wrap([[1,2,3],[4,5,6],[1,8,9],[1,2,3]]) == [[1,2,3],[4,5,6],[1,8,9],[1,2,3]]);
|
||||
assert(list_wrap([])==[]);
|
||||
assert(list_wrap([3])==[3]);
|
||||
}
|
||||
test_list_wrap();
|
||||
|
||||
|
||||
module test_list_unwrap() {
|
||||
assert(list_unwrap([[1,2,3],[4,5,6],[1,8,9]]) == [[1,2,3],[4,5,6],[1,8,9]]);
|
||||
assert(list_unwrap([[1,2,3],[4,5,6],[1,8,9],[1,2,3]]) == [[1,2,3],[4,5,6],[1,8,9]]);
|
||||
assert(list_unwrap([])==[]);
|
||||
assert(list_unwrap([3])==[3]);
|
||||
}
|
||||
test_list_unwrap();
|
||||
|
||||
|
||||
|
||||
module test_is_increasing() {
|
||||
assert(is_increasing([1,2,3,4]) == true);
|
||||
assert(is_increasing([1,2,2,2]) == true);
|
||||
|
@@ -32,21 +32,6 @@ module force_path() {
|
||||
test_is_1region();
|
||||
|
||||
|
||||
|
||||
module test_close_path() {
|
||||
assert(close_path([[1,2,3],[4,5,6],[1,8,9]]) == [[1,2,3],[4,5,6],[1,8,9],[1,2,3]]);
|
||||
assert(close_path([[1,2,3],[4,5,6],[1,8,9],[1,2,3]]) == [[1,2,3],[4,5,6],[1,8,9],[1,2,3]]);
|
||||
}
|
||||
test_close_path();
|
||||
|
||||
|
||||
module test_cleanup_path() {
|
||||
assert(cleanup_path([[1,2,3],[4,5,6],[1,8,9]]) == [[1,2,3],[4,5,6],[1,8,9]]);
|
||||
assert(cleanup_path([[1,2,3],[4,5,6],[1,8,9],[1,2,3]]) == [[1,2,3],[4,5,6],[1,8,9]]);
|
||||
}
|
||||
test_cleanup_path();
|
||||
|
||||
|
||||
module test_path_merge_collinear() {
|
||||
path = [[-20,-20], [-10,-20], [0,-10], [10,0], [20,10], [20,20], [15,30]];
|
||||
assert(path_merge_collinear(path) == [[-20,-20], [-10,-20], [20,10], [20,20], [15,30]]);
|
||||
|
Reference in New Issue
Block a user