Rename close_path and cleanup_path to list_wrap and list_unwrap

This commit is contained in:
Adrian Mariano
2023-03-02 19:40:12 -05:00
parent 5f284d5520
commit 036da1a3ef
11 changed files with 164 additions and 70 deletions

View File

@@ -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);