mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-09 03:21:09 +02:00
further type checking fixes
This commit is contained in:
@@ -217,16 +217,6 @@ module test_valid_range() {
|
||||
}
|
||||
test_valid_range();
|
||||
|
||||
module test_is_list_of() {
|
||||
assert(is_list_of([3,4,5], 0));
|
||||
assert(!is_list_of([3,4,undef], 0));
|
||||
assert(is_list_of([[3,4],[4,5]], [1,1]));
|
||||
assert(!is_list_of([[3,4], 6, [4,5]], [1,1]));
|
||||
assert(is_list_of([[1,[3,4]], [4,[5,6]]], [1,[2,3]]));
|
||||
assert(!is_list_of([[1,[3,INF]], [4,[5,6]]], [1,[2,3]]));
|
||||
}
|
||||
test_is_list_of();
|
||||
|
||||
module test_is_consistent() {
|
||||
assert(is_consistent([]));
|
||||
assert(is_consistent([[],[]]));
|
||||
@@ -238,6 +228,13 @@ module test_is_consistent() {
|
||||
assert(!is_consistent([[3,4,5],[3,4]]));
|
||||
assert(is_consistent([[3,[3,4,[5]]], [5,[2,9,[9]]]]));
|
||||
assert(!is_consistent([[3,[3,4,[5]]], [5,[2,9,9]]]));
|
||||
|
||||
assert(is_consistent([3,4,5], 0));
|
||||
assert(!is_consistent([3,4,undef], 0));
|
||||
assert(is_consistent([[3,4],[4,5]], [1,1]));
|
||||
assert(!is_consistent([[3,4], 6, [4,5]], [1,1]));
|
||||
assert(is_consistent([[1,[3,4]], [4,[5,6]]], [1,[2,3]]));
|
||||
assert(!is_consistent([[1,[3,INF]], [4,[5,6]]], [1,[2,3]]));
|
||||
}
|
||||
test_is_consistent();
|
||||
|
||||
|
Reference in New Issue
Block a user