further type checking fixes

This commit is contained in:
Adrian Mariano
2021-03-14 12:08:20 -04:00
parent 35c2d7df42
commit 737baed34c
5 changed files with 32 additions and 45 deletions

View File

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