Files
mercury/tests/hard_coded/test_ranges.exp
Julien Fischer 369e24a49a Extend testing of the ranges module.
Document some exception conditions in the ranges module.

library/ranges.m:
    Document the when insert and delete will throw an exception.

tests/test_ranges.{m,ex}:
    Test that attempting to construct a ranges value containing min_int
    results in an exception being thrown. To do this without hardcoding
    machine-specific values in the expected value, extend the code used
    to print ranges to output symbolic names for {min,max}_int.

    Fix spelling.
2025-01-10 17:11:57 +11:00

2210 lines
112 KiB
Plaintext

*** Test construction of ranges ***
empty = []
range(0, 0) = [[0]]
range(1, 0) = []
range(-1, 1) = [[-1 .. 1]]
range(1, 3) = [[1 .. 3]]
range(3, 1) = []
range(min_int) = <<exception: function `ranges.range'/2: cannot represent min_int>>
make_singleton_set(-1) = [[-1]]
make_singleton_set(0) = [[0]]
make_singleton_set(1) = [[1]]
make_singleton_set(min_int) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
make_singleton_set(max_int) = [[max_int]]
*** Test universe/0 ***
PASS: ranges.universe is empty.
PASS: ranges.universe is contiguous
PASS: ranges.universe lower bound is min_int + 1.
PASS: ranges.universe upper bound is max_int.
*** Test is_empty/1 ***
is_empty([]) ===> TRUE
is_empty([[-1]]) ===> FAIL
is_empty([[0]]) ===> FAIL
is_empty([[1]]) ===> FAIL
is_empty([[-3 .. -1]]) ===> FAIL
is_empty([[-1 .. 1]]) ===> FAIL
is_empty([[1 .. 3]]) ===> FAIL
is_empty([[-10 .. -7], [-3 .. -1]]) ===> FAIL
is_empty([[1 .. 3], [7 .. 10]]) ===> FAIL
is_empty([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
is_empty([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
is_empty([[-1], [1], [3], [5], [7], [9]]) ===> FAIL
*** Test is_non_empty/1 ***
is_non_empty([]) ===> FAIL
is_non_empty([[-1]]) ===> TRUE
is_non_empty([[0]]) ===> TRUE
is_non_empty([[1]]) ===> TRUE
is_non_empty([[-3 .. -1]]) ===> TRUE
is_non_empty([[-1 .. 1]]) ===> TRUE
is_non_empty([[1 .. 3]]) ===> TRUE
is_non_empty([[-10 .. -7], [-3 .. -1]]) ===> TRUE
is_non_empty([[1 .. 3], [7 .. 10]]) ===> TRUE
is_non_empty([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
is_non_empty([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
is_non_empty([[-1], [1], [3], [5], [7], [9]]) ===> TRUE
*** Test is_contiguous/3 ***
is_contiguous([]) ===> FAIL
is_contiguous([[-1]]) ===> [-1, -1]
is_contiguous([[0]]) ===> [0, 0]
is_contiguous([[1]]) ===> [1, 1]
is_contiguous([[-3 .. -1]]) ===> [-3, -1]
is_contiguous([[-1 .. 1]]) ===> [-1, 1]
is_contiguous([[1 .. 3]]) ===> [1, 3]
is_contiguous([[-10 .. -7], [-3 .. -1]]) ===> FAIL
is_contiguous([[1 .. 3], [7 .. 10]]) ===> FAIL
is_contiguous([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
is_contiguous([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
is_contiguous([[-1], [1], [3], [5], [7], [9]]) ===> FAIL
*** Test is_singleton/2 ***
is_singleton([]) ===> FAIL
is_singleton([[-1]]) ===> -1
is_singleton([[0]]) ===> 0
is_singleton([[1]]) ===> 1
is_singleton([[-3 .. -1]]) ===> FAIL
is_singleton([[-1 .. 1]]) ===> FAIL
is_singleton([[1 .. 3]]) ===> FAIL
is_singleton([[-10 .. -7], [-3 .. -1]]) ===> FAIL
is_singleton([[1 .. 3], [7 .. 10]]) ===> FAIL
is_singleton([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
is_singleton([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
is_singleton([[-1], [1], [3], [5], [7], [9]]) ===> FAIL
*** Test compare/3 and lex_compare/3 ***
compare_lex([], []) ===> '='
compare([], []) ===> '='
compare_lex([], [[1]]) ===> '<'
compare([], [[1]]) ===> '<'
compare_lex([[1]], []) ===> '>'
compare([[1]], []) ===> '>'
compare_lex([[1], [3]], [[2]]) ===> '<'
compare([[1], [3]], [[2]]) ===> '<'
compare_lex([[2]], [[1], [3]]) ===> '>'
compare([[2]], [[1], [3]]) ===> '>'
compare_lex([[1, 2]], [[1], [3]]) ===> '<'
compare([[1, 2]], [[1], [3]]) ===> '>'
compare_lex([[1], [3]], [[1, 2]]) ===> '>'
compare([[1], [3]], [[1, 2]]) ===> '<'
compare_lex([[1 .. 4]], [[1], [3]]) ===> '<'
compare([[1 .. 4]], [[1], [3]]) ===> '>'
compare_lex([[1], [3]], [[1 .. 4]]) ===> '>'
compare([[1], [3]], [[1 .. 4]]) ===> '<'
compare_lex([[1 .. 4]], [[1], [5]]) ===> '<'
compare([[1 .. 4]], [[1], [5]]) ===> '>'
compare_lex([[1], [5]], [[1 .. 4]]) ===> '>'
compare([[1], [5]], [[1 .. 4]]) ===> '<'
compare_lex([[1 .. 4]], [[1 .. 5]]) ===> '<'
compare([[1 .. 4]], [[1 .. 5]]) ===> '<'
compare_lex([[1 .. 5]], [[1 .. 4]]) ===> '>'
compare([[1 .. 5]], [[1 .. 4]]) ===> '>'
*** Test member/2 ***
member(-11, []) ===> FAIL
member(-7, []) ===> FAIL
member(0, []) ===> FAIL
member(1, []) ===> FAIL
member(2, []) ===> FAIL
member(3, []) ===> FAIL
member(10, []) ===> FAIL
member(11, []) ===> FAIL
member(-11, [[-1]]) ===> FAIL
member(-7, [[-1]]) ===> FAIL
member(0, [[-1]]) ===> FAIL
member(1, [[-1]]) ===> FAIL
member(2, [[-1]]) ===> FAIL
member(3, [[-1]]) ===> FAIL
member(10, [[-1]]) ===> FAIL
member(11, [[-1]]) ===> FAIL
member(-11, [[0]]) ===> FAIL
member(-7, [[0]]) ===> FAIL
member(0, [[0]]) ===> TRUE
member(1, [[0]]) ===> FAIL
member(2, [[0]]) ===> FAIL
member(3, [[0]]) ===> FAIL
member(10, [[0]]) ===> FAIL
member(11, [[0]]) ===> FAIL
member(-11, [[1]]) ===> FAIL
member(-7, [[1]]) ===> FAIL
member(0, [[1]]) ===> FAIL
member(1, [[1]]) ===> TRUE
member(2, [[1]]) ===> FAIL
member(3, [[1]]) ===> FAIL
member(10, [[1]]) ===> FAIL
member(11, [[1]]) ===> FAIL
member(-11, [[-3 .. -1]]) ===> FAIL
member(-7, [[-3 .. -1]]) ===> FAIL
member(0, [[-3 .. -1]]) ===> FAIL
member(1, [[-3 .. -1]]) ===> FAIL
member(2, [[-3 .. -1]]) ===> FAIL
member(3, [[-3 .. -1]]) ===> FAIL
member(10, [[-3 .. -1]]) ===> FAIL
member(11, [[-3 .. -1]]) ===> FAIL
member(-11, [[-1 .. 1]]) ===> FAIL
member(-7, [[-1 .. 1]]) ===> FAIL
member(0, [[-1 .. 1]]) ===> TRUE
member(1, [[-1 .. 1]]) ===> TRUE
member(2, [[-1 .. 1]]) ===> FAIL
member(3, [[-1 .. 1]]) ===> FAIL
member(10, [[-1 .. 1]]) ===> FAIL
member(11, [[-1 .. 1]]) ===> FAIL
member(-11, [[1 .. 3]]) ===> FAIL
member(-7, [[1 .. 3]]) ===> FAIL
member(0, [[1 .. 3]]) ===> FAIL
member(1, [[1 .. 3]]) ===> TRUE
member(2, [[1 .. 3]]) ===> TRUE
member(3, [[1 .. 3]]) ===> TRUE
member(10, [[1 .. 3]]) ===> FAIL
member(11, [[1 .. 3]]) ===> FAIL
member(-11, [[-10 .. -7], [-3 .. -1]]) ===> FAIL
member(-7, [[-10 .. -7], [-3 .. -1]]) ===> TRUE
member(0, [[-10 .. -7], [-3 .. -1]]) ===> FAIL
member(1, [[-10 .. -7], [-3 .. -1]]) ===> FAIL
member(2, [[-10 .. -7], [-3 .. -1]]) ===> FAIL
member(3, [[-10 .. -7], [-3 .. -1]]) ===> FAIL
member(10, [[-10 .. -7], [-3 .. -1]]) ===> FAIL
member(11, [[-10 .. -7], [-3 .. -1]]) ===> FAIL
member(-11, [[1 .. 3], [7 .. 10]]) ===> FAIL
member(-7, [[1 .. 3], [7 .. 10]]) ===> FAIL
member(0, [[1 .. 3], [7 .. 10]]) ===> FAIL
member(1, [[1 .. 3], [7 .. 10]]) ===> TRUE
member(2, [[1 .. 3], [7 .. 10]]) ===> TRUE
member(3, [[1 .. 3], [7 .. 10]]) ===> TRUE
member(10, [[1 .. 3], [7 .. 10]]) ===> TRUE
member(11, [[1 .. 3], [7 .. 10]]) ===> FAIL
member(-11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
member(-7, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
member(0, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
member(1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
member(2, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
member(3, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
member(10, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
member(11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
member(-11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
member(-7, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
member(0, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
member(1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
member(2, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
member(3, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
member(10, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
member(11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
member(-11, [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
member(-7, [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
member(0, [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
member(1, [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
member(2, [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
member(3, [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
member(10, [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
member(11, [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
*** Test nondet_range_member/2 ****
nondet_range_member([]) ===> []
nondet_range_member([[-1]]) ===> [{-1, -1}]
nondet_range_member([[0]]) ===> [{0, 0}]
nondet_range_member([[1]]) ===> [{1, 1}]
nondet_range_member([[-3 .. -1]]) ===> [{-3, -1}]
nondet_range_member([[-1 .. 1]]) ===> [{-1, 1}]
nondet_range_member([[1 .. 3]]) ===> [{1, 3}]
nondet_range_member([[-10 .. -7], [-3 .. -1]]) ===> [{-10, -7}, {-3, -1}]
nondet_range_member([[1 .. 3], [7 .. 10]]) ===> [{1, 3}, {7, 10}]
nondet_range_member([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> [{-10, -7}, {-1, 1}, {7, 10}]
nondet_range_member([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> [{-6, -3}, {-1, 1}, {3, 6}]
nondet_range_member([[-1], [1], [3], [5], [7], [9]]) ===> [{-1, -1}, {1, 1}, {3, 3}, {5, 5}, {7, 7}, {9, 9}]
*** Test nondet_member/2 ***
nondet_member([]) ===> []
nondet_member([[-1]]) ===> [-1]
nondet_member([[0]]) ===> [0]
nondet_member([[1]]) ===> [1]
nondet_member([[-3 .. -1]]) ===> [-3, -2, -1]
nondet_member([[-1 .. 1]]) ===> [-1, 0, 1]
nondet_member([[1 .. 3]]) ===> [1, 2, 3]
nondet_member([[-10 .. -7], [-3 .. -1]]) ===> [-10, -9, -8, -7, -3, -2, -1]
nondet_member([[1 .. 3], [7 .. 10]]) ===> [1, 2, 3, 7, 8, 9, 10]
nondet_member([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> [-10, -9, -8, -7, -1, 0, 1, 7, 8, 9, 10]
nondet_member([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> [-6, -5, -4, -3, -1, 0, 1, 3, 4, 5, 6]
nondet_member([[-1], [1], [3], [5], [7], [9]]) ===> [-1, 1, 3, 5, 7, 9]
*** Test insert/2 ***
insert(min_int, []) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, []) = [[-1]]
insert(0, []) = [[0]]
insert(1, []) = [[1]]
insert(10, []) = [[10]]
insert(max_int, []) = [[max_int]]
insert(min_int, [[-1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[-1]]) = [[-1]]
insert(0, [[-1]]) = [[-1, 0]]
insert(1, [[-1]]) = [[-1], [1]]
insert(10, [[-1]]) = [[-1], [10]]
insert(max_int, [[-1]]) = [[-1], [max_int]]
insert(min_int, [[0]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[0]]) = [[-1, 0]]
insert(0, [[0]]) = [[0]]
insert(1, [[0]]) = [[0, 1]]
insert(10, [[0]]) = [[0], [10]]
insert(max_int, [[0]]) = [[0], [max_int]]
insert(min_int, [[1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[1]]) = [[-1], [1]]
insert(0, [[1]]) = [[0, 1]]
insert(1, [[1]]) = [[1]]
insert(10, [[1]]) = [[1], [10]]
insert(max_int, [[1]]) = [[1], [max_int]]
insert(min_int, [[-3 .. -1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[-3 .. -1]]) = [[-3 .. -1]]
insert(0, [[-3 .. -1]]) = [[-3 .. 0]]
insert(1, [[-3 .. -1]]) = [[-3 .. -1], [1]]
insert(10, [[-3 .. -1]]) = [[-3 .. -1], [10]]
insert(max_int, [[-3 .. -1]]) = [[-3 .. -1], [max_int]]
insert(min_int, [[-1 .. 1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[-1 .. 1]]) = [[-1 .. 1]]
insert(0, [[-1 .. 1]]) = [[-1 .. 1]]
insert(1, [[-1 .. 1]]) = [[-1 .. 1]]
insert(10, [[-1 .. 1]]) = [[-1 .. 1], [10]]
insert(max_int, [[-1 .. 1]]) = [[-1 .. 1], [max_int]]
insert(min_int, [[1 .. 3]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[1 .. 3]]) = [[-1], [1 .. 3]]
insert(0, [[1 .. 3]]) = [[0 .. 3]]
insert(1, [[1 .. 3]]) = [[1 .. 3]]
insert(10, [[1 .. 3]]) = [[1 .. 3], [10]]
insert(max_int, [[1 .. 3]]) = [[1 .. 3], [max_int]]
insert(min_int, [[-10 .. -7], [-3 .. -1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
insert(0, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. 0]]
insert(1, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1], [1]]
insert(10, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1], [10]]
insert(max_int, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1], [max_int]]
insert(min_int, [[1 .. 3], [7 .. 10]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[1 .. 3], [7 .. 10]]) = [[-1], [1 .. 3], [7 .. 10]]
insert(0, [[1 .. 3], [7 .. 10]]) = [[0 .. 3], [7 .. 10]]
insert(1, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
insert(10, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
insert(max_int, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10], [max_int]]
insert(min_int, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
insert(0, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
insert(1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
insert(10, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
insert(max_int, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10], [max_int]]
insert(min_int, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
insert(0, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
insert(1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
insert(10, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6], [10]]
insert(max_int, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6], [max_int]]
insert(min_int, [[-1], [1], [3], [5], [7], [9]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
insert(-1, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
insert(0, [[-1], [1], [3], [5], [7], [9]]) = [[-1 .. 1], [3], [5], [7], [9]]
insert(1, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
insert(10, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9, 10]]
insert(max_int, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9], [max_int]]
*** Test delete/2 ***
delete(min_int, []) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, []) = []
delete(0, []) = []
delete(1, []) = []
delete(10, []) = []
delete(max_int, []) = []
delete(min_int, [[-1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[-1]]) = []
delete(0, [[-1]]) = [[-1]]
delete(1, [[-1]]) = [[-1]]
delete(10, [[-1]]) = [[-1]]
delete(max_int, [[-1]]) = [[-1]]
delete(min_int, [[0]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[0]]) = [[0]]
delete(0, [[0]]) = []
delete(1, [[0]]) = [[0]]
delete(10, [[0]]) = [[0]]
delete(max_int, [[0]]) = [[0]]
delete(min_int, [[1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[1]]) = [[1]]
delete(0, [[1]]) = [[1]]
delete(1, [[1]]) = []
delete(10, [[1]]) = [[1]]
delete(max_int, [[1]]) = [[1]]
delete(min_int, [[-3 .. -1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[-3 .. -1]]) = [[-3, -2]]
delete(0, [[-3 .. -1]]) = [[-3 .. -1]]
delete(1, [[-3 .. -1]]) = [[-3 .. -1]]
delete(10, [[-3 .. -1]]) = [[-3 .. -1]]
delete(max_int, [[-3 .. -1]]) = [[-3 .. -1]]
delete(min_int, [[-1 .. 1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[-1 .. 1]]) = [[0, 1]]
delete(0, [[-1 .. 1]]) = [[-1], [1]]
delete(1, [[-1 .. 1]]) = [[-1, 0]]
delete(10, [[-1 .. 1]]) = [[-1 .. 1]]
delete(max_int, [[-1 .. 1]]) = [[-1 .. 1]]
delete(min_int, [[1 .. 3]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[1 .. 3]]) = [[1 .. 3]]
delete(0, [[1 .. 3]]) = [[1 .. 3]]
delete(1, [[1 .. 3]]) = [[2, 3]]
delete(10, [[1 .. 3]]) = [[1 .. 3]]
delete(max_int, [[1 .. 3]]) = [[1 .. 3]]
delete(min_int, [[-10 .. -7], [-3 .. -1]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3, -2]]
delete(0, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
delete(1, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
delete(10, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
delete(max_int, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
delete(min_int, [[1 .. 3], [7 .. 10]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
delete(0, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
delete(1, [[1 .. 3], [7 .. 10]]) = [[2, 3], [7 .. 10]]
delete(10, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 9]]
delete(max_int, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
delete(min_int, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [0, 1], [7 .. 10]]
delete(0, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1], [1], [7 .. 10]]
delete(1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1, 0], [7 .. 10]]
delete(10, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 9]]
delete(max_int, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
delete(min_int, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [0, 1], [3 .. 6]]
delete(0, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1], [1], [3 .. 6]]
delete(1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1, 0], [3 .. 6]]
delete(10, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
delete(max_int, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
delete(min_int, [[-1], [1], [3], [5], [7], [9]]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
delete(-1, [[-1], [1], [3], [5], [7], [9]]) = [[1], [3], [5], [7], [9]]
delete(0, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
delete(1, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [3], [5], [7], [9]]
delete(10, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
delete(max_int, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
*** Test subset/2 ***
subset([], []) ===> TRUE
subset([], [[-1]]) ===> TRUE
subset([], [[0]]) ===> TRUE
subset([], [[1]]) ===> TRUE
subset([], [[-3 .. -1]]) ===> TRUE
subset([], [[-1 .. 1]]) ===> TRUE
subset([], [[1 .. 3]]) ===> TRUE
subset([], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
subset([], [[1 .. 3], [7 .. 10]]) ===> TRUE
subset([], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
subset([], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
subset([], [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
subset([[-1]], []) ===> FAIL
subset([[-1]], [[-1]]) ===> TRUE
subset([[-1]], [[0]]) ===> FAIL
subset([[-1]], [[1]]) ===> FAIL
subset([[-1]], [[-3 .. -1]]) ===> TRUE
subset([[-1]], [[-1 .. 1]]) ===> TRUE
subset([[-1]], [[1 .. 3]]) ===> FAIL
subset([[-1]], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
subset([[-1]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[-1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
subset([[-1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
subset([[-1]], [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
subset([[0]], []) ===> FAIL
subset([[0]], [[-1]]) ===> FAIL
subset([[0]], [[0]]) ===> TRUE
subset([[0]], [[1]]) ===> FAIL
subset([[0]], [[-3 .. -1]]) ===> FAIL
subset([[0]], [[-1 .. 1]]) ===> TRUE
subset([[0]], [[1 .. 3]]) ===> FAIL
subset([[0]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[0]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[0]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
subset([[0]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
subset([[0]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[1]], []) ===> FAIL
subset([[1]], [[-1]]) ===> FAIL
subset([[1]], [[0]]) ===> FAIL
subset([[1]], [[1]]) ===> TRUE
subset([[1]], [[-3 .. -1]]) ===> FAIL
subset([[1]], [[-1 .. 1]]) ===> TRUE
subset([[1]], [[1 .. 3]]) ===> TRUE
subset([[1]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[1]], [[1 .. 3], [7 .. 10]]) ===> TRUE
subset([[1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
subset([[1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
subset([[1]], [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
subset([[-3 .. -1]], []) ===> FAIL
subset([[-3 .. -1]], [[-1]]) ===> FAIL
subset([[-3 .. -1]], [[0]]) ===> FAIL
subset([[-3 .. -1]], [[1]]) ===> FAIL
subset([[-3 .. -1]], [[-3 .. -1]]) ===> TRUE
subset([[-3 .. -1]], [[-1 .. 1]]) ===> FAIL
subset([[-3 .. -1]], [[1 .. 3]]) ===> FAIL
subset([[-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
subset([[-3 .. -1]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
subset([[-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
subset([[-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[-1 .. 1]], []) ===> FAIL
subset([[-1 .. 1]], [[-1]]) ===> FAIL
subset([[-1 .. 1]], [[0]]) ===> FAIL
subset([[-1 .. 1]], [[1]]) ===> FAIL
subset([[-1 .. 1]], [[-3 .. -1]]) ===> FAIL
subset([[-1 .. 1]], [[-1 .. 1]]) ===> TRUE
subset([[-1 .. 1]], [[1 .. 3]]) ===> FAIL
subset([[-1 .. 1]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[-1 .. 1]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[-1 .. 1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
subset([[-1 .. 1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
subset([[-1 .. 1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[1 .. 3]], []) ===> FAIL
subset([[1 .. 3]], [[-1]]) ===> FAIL
subset([[1 .. 3]], [[0]]) ===> FAIL
subset([[1 .. 3]], [[1]]) ===> FAIL
subset([[1 .. 3]], [[-3 .. -1]]) ===> FAIL
subset([[1 .. 3]], [[-1 .. 1]]) ===> FAIL
subset([[1 .. 3]], [[1 .. 3]]) ===> TRUE
subset([[1 .. 3]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[1 .. 3]], [[1 .. 3], [7 .. 10]]) ===> TRUE
subset([[1 .. 3]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
subset([[1 .. 3]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
subset([[1 .. 3]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], []) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[-1]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[0]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[1]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[-3 .. -1]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[-1 .. 1]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[1 .. 3]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
subset([[-10 .. -7], [-3 .. -1]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
subset([[-10 .. -7], [-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], []) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[-1]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[0]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[1]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[-3 .. -1]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[-1 .. 1]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[1 .. 3]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]]) ===> TRUE
subset([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
subset([[1 .. 3], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], []) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[0]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-3 .. -1]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1 .. 1]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
subset([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], []) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[0]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-3 .. -1]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1 .. 1]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
subset([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], []) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[-1]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[0]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[1]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[-3 .. -1]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[-1 .. 1]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[1 .. 3]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[1 .. 3], [7 .. 10]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
subset([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
*** Test disjoint/2 ***
disjoint([], []) ===> TRUE
disjoint([], [[-1]]) ===> TRUE
disjoint([], [[0]]) ===> TRUE
disjoint([], [[1]]) ===> TRUE
disjoint([], [[-3 .. -1]]) ===> TRUE
disjoint([], [[-1 .. 1]]) ===> TRUE
disjoint([], [[1 .. 3]]) ===> TRUE
disjoint([], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
disjoint([], [[1 .. 3], [7 .. 10]]) ===> TRUE
disjoint([], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> TRUE
disjoint([], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> TRUE
disjoint([], [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
disjoint([[-1]], []) ===> TRUE
disjoint([[-1]], [[-1]]) ===> FAIL
disjoint([[-1]], [[0]]) ===> TRUE
disjoint([[-1]], [[1]]) ===> TRUE
disjoint([[-1]], [[-3 .. -1]]) ===> FAIL
disjoint([[-1]], [[-1 .. 1]]) ===> FAIL
disjoint([[-1]], [[1 .. 3]]) ===> TRUE
disjoint([[-1]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
disjoint([[-1]], [[1 .. 3], [7 .. 10]]) ===> TRUE
disjoint([[-1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[-1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[-1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[0]], []) ===> TRUE
disjoint([[0]], [[-1]]) ===> TRUE
disjoint([[0]], [[0]]) ===> FAIL
disjoint([[0]], [[1]]) ===> TRUE
disjoint([[0]], [[-3 .. -1]]) ===> TRUE
disjoint([[0]], [[-1 .. 1]]) ===> FAIL
disjoint([[0]], [[1 .. 3]]) ===> TRUE
disjoint([[0]], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
disjoint([[0]], [[1 .. 3], [7 .. 10]]) ===> TRUE
disjoint([[0]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[0]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[0]], [[-1], [1], [3], [5], [7], [9]]) ===> TRUE
disjoint([[1]], []) ===> TRUE
disjoint([[1]], [[-1]]) ===> TRUE
disjoint([[1]], [[0]]) ===> TRUE
disjoint([[1]], [[1]]) ===> FAIL
disjoint([[1]], [[-3 .. -1]]) ===> TRUE
disjoint([[1]], [[-1 .. 1]]) ===> FAIL
disjoint([[1]], [[1 .. 3]]) ===> FAIL
disjoint([[1]], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
disjoint([[1]], [[1 .. 3], [7 .. 10]]) ===> FAIL
disjoint([[1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[-3 .. -1]], []) ===> TRUE
disjoint([[-3 .. -1]], [[-1]]) ===> FAIL
disjoint([[-3 .. -1]], [[0]]) ===> TRUE
disjoint([[-3 .. -1]], [[1]]) ===> TRUE
disjoint([[-3 .. -1]], [[-3 .. -1]]) ===> FAIL
disjoint([[-3 .. -1]], [[-1 .. 1]]) ===> FAIL
disjoint([[-3 .. -1]], [[1 .. 3]]) ===> TRUE
disjoint([[-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
disjoint([[-3 .. -1]], [[1 .. 3], [7 .. 10]]) ===> TRUE
disjoint([[-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[-1 .. 1]], []) ===> TRUE
disjoint([[-1 .. 1]], [[-1]]) ===> FAIL
disjoint([[-1 .. 1]], [[0]]) ===> FAIL
disjoint([[-1 .. 1]], [[1]]) ===> FAIL
disjoint([[-1 .. 1]], [[-3 .. -1]]) ===> FAIL
disjoint([[-1 .. 1]], [[-1 .. 1]]) ===> FAIL
disjoint([[-1 .. 1]], [[1 .. 3]]) ===> FAIL
disjoint([[-1 .. 1]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
disjoint([[-1 .. 1]], [[1 .. 3], [7 .. 10]]) ===> FAIL
disjoint([[-1 .. 1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[-1 .. 1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[-1 .. 1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[1 .. 3]], []) ===> TRUE
disjoint([[1 .. 3]], [[-1]]) ===> TRUE
disjoint([[1 .. 3]], [[0]]) ===> TRUE
disjoint([[1 .. 3]], [[1]]) ===> FAIL
disjoint([[1 .. 3]], [[-3 .. -1]]) ===> TRUE
disjoint([[1 .. 3]], [[-1 .. 1]]) ===> FAIL
disjoint([[1 .. 3]], [[1 .. 3]]) ===> FAIL
disjoint([[1 .. 3]], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
disjoint([[1 .. 3]], [[1 .. 3], [7 .. 10]]) ===> FAIL
disjoint([[1 .. 3]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[1 .. 3]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[1 .. 3]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[-10 .. -7], [-3 .. -1]], []) ===> TRUE
disjoint([[-10 .. -7], [-3 .. -1]], [[-1]]) ===> FAIL
disjoint([[-10 .. -7], [-3 .. -1]], [[0]]) ===> TRUE
disjoint([[-10 .. -7], [-3 .. -1]], [[1]]) ===> TRUE
disjoint([[-10 .. -7], [-3 .. -1]], [[-3 .. -1]]) ===> FAIL
disjoint([[-10 .. -7], [-3 .. -1]], [[-1 .. 1]]) ===> FAIL
disjoint([[-10 .. -7], [-3 .. -1]], [[1 .. 3]]) ===> TRUE
disjoint([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
disjoint([[-10 .. -7], [-3 .. -1]], [[1 .. 3], [7 .. 10]]) ===> TRUE
disjoint([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[-10 .. -7], [-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[-10 .. -7], [-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[1 .. 3], [7 .. 10]], []) ===> TRUE
disjoint([[1 .. 3], [7 .. 10]], [[-1]]) ===> TRUE
disjoint([[1 .. 3], [7 .. 10]], [[0]]) ===> TRUE
disjoint([[1 .. 3], [7 .. 10]], [[1]]) ===> FAIL
disjoint([[1 .. 3], [7 .. 10]], [[-3 .. -1]]) ===> TRUE
disjoint([[1 .. 3], [7 .. 10]], [[-1 .. 1]]) ===> FAIL
disjoint([[1 .. 3], [7 .. 10]], [[1 .. 3]]) ===> FAIL
disjoint([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) ===> TRUE
disjoint([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]]) ===> FAIL
disjoint([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[1 .. 3], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[1 .. 3], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], []) ===> TRUE
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[0]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-3 .. -1]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1 .. 1]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3], [7 .. 10]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], []) ===> TRUE
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[0]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-3 .. -1]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1 .. 1]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3], [7 .. 10]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], []) ===> TRUE
disjoint([[-1], [1], [3], [5], [7], [9]], [[-1]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[0]]) ===> TRUE
disjoint([[-1], [1], [3], [5], [7], [9]], [[1]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[-3 .. -1]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[-1 .. 1]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[1 .. 3]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-3 .. -1]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[1 .. 3], [7 .. 10]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> FAIL
disjoint([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3], [5], [7], [9]]) ===> FAIL
*** Test union/2 ***
union([], []) = []
union([], [[-1]]) = [[-1]]
union([], [[0]]) = [[0]]
union([], [[1]]) = [[1]]
union([], [[-3 .. -1]]) = [[-3 .. -1]]
union([], [[-1 .. 1]]) = [[-1 .. 1]]
union([], [[1 .. 3]]) = [[1 .. 3]]
union([], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
union([], [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
union([], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
union([[-1]], []) = [[-1]]
union([[-1]], [[-1]]) = [[-1]]
union([[-1]], [[0]]) = [[-1, 0]]
union([[-1]], [[1]]) = [[-1], [1]]
union([[-1]], [[-3 .. -1]]) = [[-3 .. -1]]
union([[-1]], [[-1 .. 1]]) = [[-1 .. 1]]
union([[-1]], [[1 .. 3]]) = [[-1], [1 .. 3]]
union([[-1]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
union([[-1]], [[1 .. 3], [7 .. 10]]) = [[-1], [1 .. 3], [7 .. 10]]
union([[-1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-1]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
union([[0]], []) = [[0]]
union([[0]], [[-1]]) = [[-1, 0]]
union([[0]], [[0]]) = [[0]]
union([[0]], [[1]]) = [[0, 1]]
union([[0]], [[-3 .. -1]]) = [[-3 .. 0]]
union([[0]], [[-1 .. 1]]) = [[-1 .. 1]]
union([[0]], [[1 .. 3]]) = [[0 .. 3]]
union([[0]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. 0]]
union([[0]], [[1 .. 3], [7 .. 10]]) = [[0 .. 3], [7 .. 10]]
union([[0]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[0]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[0]], [[-1], [1], [3], [5], [7], [9]]) = [[-1 .. 1], [3], [5], [7], [9]]
union([[1]], []) = [[1]]
union([[1]], [[-1]]) = [[-1], [1]]
union([[1]], [[0]]) = [[0, 1]]
union([[1]], [[1]]) = [[1]]
union([[1]], [[-3 .. -1]]) = [[-3 .. -1], [1]]
union([[1]], [[-1 .. 1]]) = [[-1 .. 1]]
union([[1]], [[1 .. 3]]) = [[1 .. 3]]
union([[1]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1], [1]]
union([[1]], [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
union([[1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[1]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
union([[-3 .. -1]], []) = [[-3 .. -1]]
union([[-3 .. -1]], [[-1]]) = [[-3 .. -1]]
union([[-3 .. -1]], [[0]]) = [[-3 .. 0]]
union([[-3 .. -1]], [[1]]) = [[-3 .. -1], [1]]
union([[-3 .. -1]], [[-3 .. -1]]) = [[-3 .. -1]]
union([[-3 .. -1]], [[-1 .. 1]]) = [[-3 .. 1]]
union([[-3 .. -1]], [[1 .. 3]]) = [[-3 .. -1], [1 .. 3]]
union([[-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
union([[-3 .. -1]], [[1 .. 3], [7 .. 10]]) = [[-3 .. -1], [1 .. 3], [7 .. 10]]
union([[-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-3 .. 1], [7 .. 10]]
union([[-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. 1], [3 .. 6]]
union([[-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-3 .. -1], [1], [3], [5], [7], [9]]
union([[-1 .. 1]], []) = [[-1 .. 1]]
union([[-1 .. 1]], [[-1]]) = [[-1 .. 1]]
union([[-1 .. 1]], [[0]]) = [[-1 .. 1]]
union([[-1 .. 1]], [[1]]) = [[-1 .. 1]]
union([[-1 .. 1]], [[-3 .. -1]]) = [[-3 .. 1]]
union([[-1 .. 1]], [[-1 .. 1]]) = [[-1 .. 1]]
union([[-1 .. 1]], [[1 .. 3]]) = [[-1 .. 3]]
union([[-1 .. 1]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. 1]]
union([[-1 .. 1]], [[1 .. 3], [7 .. 10]]) = [[-1 .. 3], [7 .. 10]]
union([[-1 .. 1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-1 .. 1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-1 .. 1]], [[-1], [1], [3], [5], [7], [9]]) = [[-1 .. 1], [3], [5], [7], [9]]
union([[1 .. 3]], []) = [[1 .. 3]]
union([[1 .. 3]], [[-1]]) = [[-1], [1 .. 3]]
union([[1 .. 3]], [[0]]) = [[0 .. 3]]
union([[1 .. 3]], [[1]]) = [[1 .. 3]]
union([[1 .. 3]], [[-3 .. -1]]) = [[-3 .. -1], [1 .. 3]]
union([[1 .. 3]], [[-1 .. 1]]) = [[-1 .. 3]]
union([[1 .. 3]], [[1 .. 3]]) = [[1 .. 3]]
union([[1 .. 3]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1], [1 .. 3]]
union([[1 .. 3]], [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
union([[1 .. 3]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 3], [7 .. 10]]
union([[1 .. 3]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 6]]
union([[1 .. 3]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1 .. 3], [5], [7], [9]]
union([[-10 .. -7], [-3 .. -1]], []) = [[-10 .. -7], [-3 .. -1]]
union([[-10 .. -7], [-3 .. -1]], [[-1]]) = [[-10 .. -7], [-3 .. -1]]
union([[-10 .. -7], [-3 .. -1]], [[0]]) = [[-10 .. -7], [-3 .. 0]]
union([[-10 .. -7], [-3 .. -1]], [[1]]) = [[-10 .. -7], [-3 .. -1], [1]]
union([[-10 .. -7], [-3 .. -1]], [[-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
union([[-10 .. -7], [-3 .. -1]], [[-1 .. 1]]) = [[-10 .. -7], [-3 .. 1]]
union([[-10 .. -7], [-3 .. -1]], [[1 .. 3]]) = [[-10 .. -7], [-3 .. -1], [1 .. 3]]
union([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
union([[-10 .. -7], [-3 .. -1]], [[1 .. 3], [7 .. 10]]) = [[-10 .. -7], [-3 .. -1], [1 .. 3], [7 .. 10]]
union([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-3 .. 1], [7 .. 10]]
union([[-10 .. -7], [-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-10 .. 1], [3 .. 6]]
union([[-10 .. -7], [-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-10 .. -7], [-3 .. -1], [1], [3], [5], [7], [9]]
union([[1 .. 3], [7 .. 10]], []) = [[1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[-1]]) = [[-1], [1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[0]]) = [[0 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[1]]) = [[1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[-3 .. -1]]) = [[-3 .. -1], [1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[-1 .. 1]]) = [[-1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[1 .. 3]]) = [[1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1], [1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 3], [7 .. 10]]
union([[1 .. 3], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 10]]
union([[1 .. 3], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1 .. 3], [5], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], []) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[0]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-3 .. -1]]) = [[-10 .. -7], [-3 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1 .. 1]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3]]) = [[-10 .. -7], [-1 .. 3], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = [[-10 .. -7], [-1 .. 3], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-10 .. -3], [-1 .. 1], [3 .. 10]]
union([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[-10 .. -7], [-1 .. 1], [3], [5], [7 .. 10]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], []) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[0]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-3 .. -1]]) = [[-6 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1 .. 1]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3]]) = [[-6 .. -3], [-1 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3], [7 .. 10]]) = [[-6 .. -3], [-1 .. 10]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -3], [-1 .. 1], [3 .. 10]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
union([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1], [1], [3], [5], [7], [9]]) = [[-6 .. -3], [-1 .. 1], [3 .. 7], [9]]
union([[-1], [1], [3], [5], [7], [9]], []) = [[-1], [1], [3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[-1]]) = [[-1], [1], [3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[0]]) = [[-1 .. 1], [3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[1]]) = [[-1], [1], [3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[-3 .. -1]]) = [[-3 .. -1], [1], [3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[-1 .. 1]]) = [[-1 .. 1], [3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[1 .. 3]]) = [[-1], [1 .. 3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1], [1], [3], [5], [7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[1 .. 3], [7 .. 10]]) = [[-1], [1 .. 3], [5], [7 .. 10]]
union([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [3], [5], [7 .. 10]]
union([[-1], [1], [3], [5], [7], [9]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 7], [9]]
union([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
*** Test intersect/2 ***
intersect([], []) = []
intersect([], [[-1]]) = []
intersect([], [[0]]) = []
intersect([], [[1]]) = []
intersect([], [[-3 .. -1]]) = []
intersect([], [[-1 .. 1]]) = []
intersect([], [[1 .. 3]]) = []
intersect([], [[-10 .. -7], [-3 .. -1]]) = []
intersect([], [[1 .. 3], [7 .. 10]]) = []
intersect([], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
intersect([], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
intersect([], [[-1], [1], [3], [5], [7], [9]]) = []
intersect([[-1]], []) = []
intersect([[-1]], [[-1]]) = [[-1]]
intersect([[-1]], [[0]]) = []
intersect([[-1]], [[1]]) = []
intersect([[-1]], [[-3 .. -1]]) = [[-1]]
intersect([[-1]], [[-1 .. 1]]) = [[-1]]
intersect([[-1]], [[1 .. 3]]) = []
intersect([[-1]], [[-10 .. -7], [-3 .. -1]]) = [[-1]]
intersect([[-1]], [[1 .. 3], [7 .. 10]]) = []
intersect([[-1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-1]]
intersect([[-1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-1]]
intersect([[-1]], [[-1], [1], [3], [5], [7], [9]]) = [[-1]]
intersect([[0]], []) = []
intersect([[0]], [[-1]]) = []
intersect([[0]], [[0]]) = [[0]]
intersect([[0]], [[1]]) = []
intersect([[0]], [[-3 .. -1]]) = []
intersect([[0]], [[-1 .. 1]]) = [[0]]
intersect([[0]], [[1 .. 3]]) = []
intersect([[0]], [[-10 .. -7], [-3 .. -1]]) = []
intersect([[0]], [[1 .. 3], [7 .. 10]]) = []
intersect([[0]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[0]]
intersect([[0]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[0]]
intersect([[0]], [[-1], [1], [3], [5], [7], [9]]) = []
intersect([[1]], []) = []
intersect([[1]], [[-1]]) = []
intersect([[1]], [[0]]) = []
intersect([[1]], [[1]]) = [[1]]
intersect([[1]], [[-3 .. -1]]) = []
intersect([[1]], [[-1 .. 1]]) = [[1]]
intersect([[1]], [[1 .. 3]]) = [[1]]
intersect([[1]], [[-10 .. -7], [-3 .. -1]]) = []
intersect([[1]], [[1 .. 3], [7 .. 10]]) = [[1]]
intersect([[1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[1]]
intersect([[1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[1]]
intersect([[1]], [[-1], [1], [3], [5], [7], [9]]) = [[1]]
intersect([[-3 .. -1]], []) = []
intersect([[-3 .. -1]], [[-1]]) = [[-1]]
intersect([[-3 .. -1]], [[0]]) = []
intersect([[-3 .. -1]], [[1]]) = []
intersect([[-3 .. -1]], [[-3 .. -1]]) = [[-3 .. -1]]
intersect([[-3 .. -1]], [[-1 .. 1]]) = [[-1]]
intersect([[-3 .. -1]], [[1 .. 3]]) = []
intersect([[-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = [[-3 .. -1]]
intersect([[-3 .. -1]], [[1 .. 3], [7 .. 10]]) = []
intersect([[-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-1]]
intersect([[-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-3], [-1]]
intersect([[-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-1]]
intersect([[-1 .. 1]], []) = []
intersect([[-1 .. 1]], [[-1]]) = [[-1]]
intersect([[-1 .. 1]], [[0]]) = [[0]]
intersect([[-1 .. 1]], [[1]]) = [[1]]
intersect([[-1 .. 1]], [[-3 .. -1]]) = [[-1]]
intersect([[-1 .. 1]], [[-1 .. 1]]) = [[-1 .. 1]]
intersect([[-1 .. 1]], [[1 .. 3]]) = [[1]]
intersect([[-1 .. 1]], [[-10 .. -7], [-3 .. -1]]) = [[-1]]
intersect([[-1 .. 1]], [[1 .. 3], [7 .. 10]]) = [[1]]
intersect([[-1 .. 1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-1 .. 1]]
intersect([[-1 .. 1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-1 .. 1]]
intersect([[-1 .. 1]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1]]
intersect([[1 .. 3]], []) = []
intersect([[1 .. 3]], [[-1]]) = []
intersect([[1 .. 3]], [[0]]) = []
intersect([[1 .. 3]], [[1]]) = [[1]]
intersect([[1 .. 3]], [[-3 .. -1]]) = []
intersect([[1 .. 3]], [[-1 .. 1]]) = [[1]]
intersect([[1 .. 3]], [[1 .. 3]]) = [[1 .. 3]]
intersect([[1 .. 3]], [[-10 .. -7], [-3 .. -1]]) = []
intersect([[1 .. 3]], [[1 .. 3], [7 .. 10]]) = [[1 .. 3]]
intersect([[1 .. 3]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[1]]
intersect([[1 .. 3]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[1], [3]]
intersect([[1 .. 3]], [[-1], [1], [3], [5], [7], [9]]) = [[1], [3]]
intersect([[-10 .. -7], [-3 .. -1]], []) = []
intersect([[-10 .. -7], [-3 .. -1]], [[-1]]) = [[-1]]
intersect([[-10 .. -7], [-3 .. -1]], [[0]]) = []
intersect([[-10 .. -7], [-3 .. -1]], [[1]]) = []
intersect([[-10 .. -7], [-3 .. -1]], [[-3 .. -1]]) = [[-3 .. -1]]
intersect([[-10 .. -7], [-3 .. -1]], [[-1 .. 1]]) = [[-1]]
intersect([[-10 .. -7], [-3 .. -1]], [[1 .. 3]]) = []
intersect([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
intersect([[-10 .. -7], [-3 .. -1]], [[1 .. 3], [7 .. 10]]) = []
intersect([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1]]
intersect([[-10 .. -7], [-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-3], [-1]]
intersect([[-10 .. -7], [-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-1]]
intersect([[1 .. 3], [7 .. 10]], []) = []
intersect([[1 .. 3], [7 .. 10]], [[-1]]) = []
intersect([[1 .. 3], [7 .. 10]], [[0]]) = []
intersect([[1 .. 3], [7 .. 10]], [[1]]) = [[1]]
intersect([[1 .. 3], [7 .. 10]], [[-3 .. -1]]) = []
intersect([[1 .. 3], [7 .. 10]], [[-1 .. 1]]) = [[1]]
intersect([[1 .. 3], [7 .. 10]], [[1 .. 3]]) = [[1 .. 3]]
intersect([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = []
intersect([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
intersect([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[1], [7 .. 10]]
intersect([[1 .. 3], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[1], [3]]
intersect([[1 .. 3], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[1], [3], [7], [9]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], []) = []
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1]]) = [[-1]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[0]]) = [[0]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1]]) = [[1]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-3 .. -1]]) = [[-1]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1 .. 1]]) = [[-1 .. 1]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3]]) = [[1]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-1]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = [[1], [7 .. 10]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-1 .. 1]]
intersect([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [7], [9]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], []) = []
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1]]) = [[-1]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[0]]) = [[0]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1]]) = [[1]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-3 .. -1]]) = [[-3], [-1]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1 .. 1]]) = [[-1 .. 1]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3]]) = [[1], [3]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-3 .. -1]]) = [[-3], [-1]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3], [7 .. 10]]) = [[1], [3]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-1 .. 1]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
intersect([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5]]
intersect([[-1], [1], [3], [5], [7], [9]], []) = []
intersect([[-1], [1], [3], [5], [7], [9]], [[-1]]) = [[-1]]
intersect([[-1], [1], [3], [5], [7], [9]], [[0]]) = []
intersect([[-1], [1], [3], [5], [7], [9]], [[1]]) = [[1]]
intersect([[-1], [1], [3], [5], [7], [9]], [[-3 .. -1]]) = [[-1]]
intersect([[-1], [1], [3], [5], [7], [9]], [[-1 .. 1]]) = [[-1], [1]]
intersect([[-1], [1], [3], [5], [7], [9]], [[1 .. 3]]) = [[1], [3]]
intersect([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-3 .. -1]]) = [[-1]]
intersect([[-1], [1], [3], [5], [7], [9]], [[1 .. 3], [7 .. 10]]) = [[1], [3], [7], [9]]
intersect([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-1], [1], [7], [9]]
intersect([[-1], [1], [3], [5], [7], [9]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-1], [1], [3], [5]]
intersect([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
*** Test difference/2 ***
difference([], []) = []
difference([], [[-1]]) = []
difference([], [[0]]) = []
difference([], [[1]]) = []
difference([], [[-3 .. -1]]) = []
difference([], [[-1 .. 1]]) = []
difference([], [[1 .. 3]]) = []
difference([], [[-10 .. -7], [-3 .. -1]]) = []
difference([], [[1 .. 3], [7 .. 10]]) = []
difference([], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
difference([], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
difference([], [[-1], [1], [3], [5], [7], [9]]) = []
difference([[-1]], []) = [[-1]]
difference([[-1]], [[-1]]) = []
difference([[-1]], [[0]]) = [[-1]]
difference([[-1]], [[1]]) = [[-1]]
difference([[-1]], [[-3 .. -1]]) = []
difference([[-1]], [[-1 .. 1]]) = []
difference([[-1]], [[1 .. 3]]) = [[-1]]
difference([[-1]], [[-10 .. -7], [-3 .. -1]]) = []
difference([[-1]], [[1 .. 3], [7 .. 10]]) = [[-1]]
difference([[-1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
difference([[-1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
difference([[-1]], [[-1], [1], [3], [5], [7], [9]]) = []
difference([[0]], []) = [[0]]
difference([[0]], [[-1]]) = [[0]]
difference([[0]], [[0]]) = []
difference([[0]], [[1]]) = [[0]]
difference([[0]], [[-3 .. -1]]) = [[0]]
difference([[0]], [[-1 .. 1]]) = []
difference([[0]], [[1 .. 3]]) = [[0]]
difference([[0]], [[-10 .. -7], [-3 .. -1]]) = [[0]]
difference([[0]], [[1 .. 3], [7 .. 10]]) = [[0]]
difference([[0]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
difference([[0]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
difference([[0]], [[-1], [1], [3], [5], [7], [9]]) = [[0]]
difference([[1]], []) = [[1]]
difference([[1]], [[-1]]) = [[1]]
difference([[1]], [[0]]) = [[1]]
difference([[1]], [[1]]) = []
difference([[1]], [[-3 .. -1]]) = [[1]]
difference([[1]], [[-1 .. 1]]) = []
difference([[1]], [[1 .. 3]]) = []
difference([[1]], [[-10 .. -7], [-3 .. -1]]) = [[1]]
difference([[1]], [[1 .. 3], [7 .. 10]]) = []
difference([[1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
difference([[1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
difference([[1]], [[-1], [1], [3], [5], [7], [9]]) = []
difference([[-3 .. -1]], []) = [[-3 .. -1]]
difference([[-3 .. -1]], [[-1]]) = [[-3, -2]]
difference([[-3 .. -1]], [[0]]) = [[-3 .. -1]]
difference([[-3 .. -1]], [[1]]) = [[-3 .. -1]]
difference([[-3 .. -1]], [[-3 .. -1]]) = []
difference([[-3 .. -1]], [[-1 .. 1]]) = [[-3, -2]]
difference([[-3 .. -1]], [[1 .. 3]]) = [[-3 .. -1]]
difference([[-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = []
difference([[-3 .. -1]], [[1 .. 3], [7 .. 10]]) = [[-3 .. -1]]
difference([[-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-3, -2]]
difference([[-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-2]]
difference([[-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-3, -2]]
difference([[-1 .. 1]], []) = [[-1 .. 1]]
difference([[-1 .. 1]], [[-1]]) = [[0, 1]]
difference([[-1 .. 1]], [[0]]) = [[-1], [1]]
difference([[-1 .. 1]], [[1]]) = [[-1, 0]]
difference([[-1 .. 1]], [[-3 .. -1]]) = [[0, 1]]
difference([[-1 .. 1]], [[-1 .. 1]]) = []
difference([[-1 .. 1]], [[1 .. 3]]) = [[-1, 0]]
difference([[-1 .. 1]], [[-10 .. -7], [-3 .. -1]]) = [[0, 1]]
difference([[-1 .. 1]], [[1 .. 3], [7 .. 10]]) = [[-1, 0]]
difference([[-1 .. 1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
difference([[-1 .. 1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
difference([[-1 .. 1]], [[-1], [1], [3], [5], [7], [9]]) = [[0]]
difference([[1 .. 3]], []) = [[1 .. 3]]
difference([[1 .. 3]], [[-1]]) = [[1 .. 3]]
difference([[1 .. 3]], [[0]]) = [[1 .. 3]]
difference([[1 .. 3]], [[1]]) = [[2, 3]]
difference([[1 .. 3]], [[-3 .. -1]]) = [[1 .. 3]]
difference([[1 .. 3]], [[-1 .. 1]]) = [[2, 3]]
difference([[1 .. 3]], [[1 .. 3]]) = []
difference([[1 .. 3]], [[-10 .. -7], [-3 .. -1]]) = [[1 .. 3]]
difference([[1 .. 3]], [[1 .. 3], [7 .. 10]]) = []
difference([[1 .. 3]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[2, 3]]
difference([[1 .. 3]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[2]]
difference([[1 .. 3]], [[-1], [1], [3], [5], [7], [9]]) = [[2]]
difference([[-10 .. -7], [-3 .. -1]], []) = [[-10 .. -7], [-3 .. -1]]
difference([[-10 .. -7], [-3 .. -1]], [[-1]]) = [[-10 .. -7], [-3, -2]]
difference([[-10 .. -7], [-3 .. -1]], [[0]]) = [[-10 .. -7], [-3 .. -1]]
difference([[-10 .. -7], [-3 .. -1]], [[1]]) = [[-10 .. -7], [-3 .. -1]]
difference([[-10 .. -7], [-3 .. -1]], [[-3 .. -1]]) = [[-10 .. -7]]
difference([[-10 .. -7], [-3 .. -1]], [[-1 .. 1]]) = [[-10 .. -7], [-3, -2]]
difference([[-10 .. -7], [-3 .. -1]], [[1 .. 3]]) = [[-10 .. -7], [-3 .. -1]]
difference([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = []
difference([[-10 .. -7], [-3 .. -1]], [[1 .. 3], [7 .. 10]]) = [[-10 .. -7], [-3 .. -1]]
difference([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-3, -2]]
difference([[-10 .. -7], [-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-10 .. -7], [-2]]
difference([[-10 .. -7], [-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-10 .. -7], [-3, -2]]
difference([[1 .. 3], [7 .. 10]], []) = [[1 .. 3], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[-1]]) = [[1 .. 3], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[0]]) = [[1 .. 3], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[1]]) = [[2, 3], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[-3 .. -1]]) = [[1 .. 3], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[-1 .. 1]]) = [[2, 3], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[1 .. 3]]) = [[7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = [[1 .. 3], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = []
difference([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[2, 3]]
difference([[1 .. 3], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[2], [7 .. 10]]
difference([[1 .. 3], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[2], [8], [10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], []) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1]]) = [[-10 .. -7], [0, 1], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[0]]) = [[-10 .. -7], [-1], [1], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1]]) = [[-10 .. -7], [-1, 0], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-3 .. -1]]) = [[-10 .. -7], [0, 1], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1 .. 1]]) = [[-10 .. -7], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3]]) = [[-10 .. -7], [-1, 0], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = [[0, 1], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = [[-10 .. -7], [-1, 0]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-10 .. -7], [7 .. 10]]
difference([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[-10 .. -7], [0], [8], [10]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], []) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1]]) = [[-6 .. -3], [0, 1], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[0]]) = [[-6 .. -3], [-1], [1], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1]]) = [[-6 .. -3], [-1, 0], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-3 .. -1]]) = [[-6 .. -4], [0, 1], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1 .. 1]]) = [[-6 .. -3], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3]]) = [[-6 .. -3], [-1, 0], [4 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-3 .. -1]]) = [[-6 .. -4], [0, 1], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3], [7 .. 10]]) = [[-6 .. -3], [-1, 0], [4 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-6 .. -3], [3 .. 6]]
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
difference([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1], [1], [3], [5], [7], [9]]) = [[-6 .. -3], [0], [4], [6]]
difference([[-1], [1], [3], [5], [7], [9]], []) = [[-1], [1], [3], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[-1]]) = [[1], [3], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[0]]) = [[-1], [1], [3], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[1]]) = [[-1], [3], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[-3 .. -1]]) = [[1], [3], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[-1 .. 1]]) = [[3], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[1 .. 3]]) = [[-1], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-3 .. -1]]) = [[1], [3], [5], [7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[1 .. 3], [7 .. 10]]) = [[-1], [5]]
difference([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[3], [5]]
difference([[-1], [1], [3], [5], [7], [9]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[7], [9]]
difference([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3], [5], [7], [9]]) = []
*** test split/4 ***
split([]) ===> FAIL
split([[-1]]) ===> {Lo = -1, Hi = -1, Rest = []}
split([[0]]) ===> {Lo = 0, Hi = 0, Rest = []}
split([[1]]) ===> {Lo = 1, Hi = 1, Rest = []}
split([[-3 .. -1]]) ===> {Lo = -3, Hi = -1, Rest = []}
split([[-1 .. 1]]) ===> {Lo = -1, Hi = 1, Rest = []}
split([[1 .. 3]]) ===> {Lo = 1, Hi = 3, Rest = []}
split([[-10 .. -7], [-3 .. -1]]) ===> {Lo = -10, Hi = -7, Rest = [[-3 .. -1]]}
split([[1 .. 3], [7 .. 10]]) ===> {Lo = 1, Hi = 3, Rest = [[7 .. 10]]}
split([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> {Lo = -10, Hi = -7, Rest = [[-1 .. 1], [7 .. 10]]}
split([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> {Lo = -6, Hi = -3, Rest = [[-1 .. 1], [3 .. 6]]}
split([[-1], [1], [3], [5], [7], [9]]) ===> {Lo = -1, Hi = -1, Rest = [[1], [3], [5], [7], [9]]}
**** test prune_to_next_non_member/4 ***
prune_to_next_non_member([], [], -5, -5).
prune_to_next_non_member([], [], -1, -1).
prune_to_next_non_member([], [], 0, 0).
prune_to_next_non_member([], [], 1, 1).
prune_to_next_non_member([], [], 5, 5).
prune_to_next_non_member([[-1]], [[-1]], -5, -5).
prune_to_next_non_member([[-1]], [], -1, 0).
prune_to_next_non_member([[-1]], [], 0, 0).
prune_to_next_non_member([[-1]], [], 1, 1).
prune_to_next_non_member([[-1]], [], 5, 5).
prune_to_next_non_member([[0]], [[0]], -5, -5).
prune_to_next_non_member([[0]], [[0]], -1, -1).
prune_to_next_non_member([[0]], [], 0, 1).
prune_to_next_non_member([[0]], [], 1, 1).
prune_to_next_non_member([[0]], [], 5, 5).
prune_to_next_non_member([[1]], [[1]], -5, -5).
prune_to_next_non_member([[1]], [[1]], -1, -1).
prune_to_next_non_member([[1]], [[1]], 0, 0).
prune_to_next_non_member([[1]], [], 1, 2).
prune_to_next_non_member([[1]], [], 5, 5).
prune_to_next_non_member([[-3 .. -1]], [[-3 .. -1]], -5, -5).
prune_to_next_non_member([[-3 .. -1]], [], -1, 0).
prune_to_next_non_member([[-3 .. -1]], [], 0, 0).
prune_to_next_non_member([[-3 .. -1]], [], 1, 1).
prune_to_next_non_member([[-3 .. -1]], [], 5, 5).
prune_to_next_non_member([[-1 .. 1]], [[-1 .. 1]], -5, -5).
prune_to_next_non_member([[-1 .. 1]], [], -1, 2).
prune_to_next_non_member([[-1 .. 1]], [], 0, 2).
prune_to_next_non_member([[-1 .. 1]], [], 1, 2).
prune_to_next_non_member([[-1 .. 1]], [], 5, 5).
prune_to_next_non_member([[1 .. 3]], [[1 .. 3]], -5, -5).
prune_to_next_non_member([[1 .. 3]], [[1 .. 3]], -1, -1).
prune_to_next_non_member([[1 .. 3]], [[1 .. 3]], 0, 0).
prune_to_next_non_member([[1 .. 3]], [], 1, 4).
prune_to_next_non_member([[1 .. 3]], [], 5, 5).
prune_to_next_non_member([[-10 .. -7], [-3 .. -1]], [[-3 .. -1]], -5, -5).
prune_to_next_non_member([[-10 .. -7], [-3 .. -1]], [], -1, 0).
prune_to_next_non_member([[-10 .. -7], [-3 .. -1]], [], 0, 0).
prune_to_next_non_member([[-10 .. -7], [-3 .. -1]], [], 1, 1).
prune_to_next_non_member([[-10 .. -7], [-3 .. -1]], [], 5, 5).
prune_to_next_non_member([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]], -5, -5).
prune_to_next_non_member([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]], -1, -1).
prune_to_next_non_member([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]], 0, 0).
prune_to_next_non_member([[1 .. 3], [7 .. 10]], [[7 .. 10]], 1, 4).
prune_to_next_non_member([[1 .. 3], [7 .. 10]], [[7 .. 10]], 5, 5).
prune_to_next_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1 .. 1], [7 .. 10]], -5, -5).
prune_to_next_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[7 .. 10]], -1, 2).
prune_to_next_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[7 .. 10]], 0, 2).
prune_to_next_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[7 .. 10]], 1, 2).
prune_to_next_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[7 .. 10]], 5, 5).
prune_to_next_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1 .. 1], [3 .. 6]], -5, -2).
prune_to_next_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[3 .. 6]], -1, 2).
prune_to_next_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[3 .. 6]], 0, 2).
prune_to_next_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[3 .. 6]], 1, 2).
prune_to_next_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [], 5, 7).
prune_to_next_non_member([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3], [5], [7], [9]], -5, -5).
prune_to_next_non_member([[-1], [1], [3], [5], [7], [9]], [[1], [3], [5], [7], [9]], -1, 0).
prune_to_next_non_member([[-1], [1], [3], [5], [7], [9]], [[1], [3], [5], [7], [9]], 0, 0).
prune_to_next_non_member([[-1], [1], [3], [5], [7], [9]], [[3], [5], [7], [9]], 1, 2).
prune_to_next_non_member([[-1], [1], [3], [5], [7], [9]], [[7], [9]], 5, 6).
**** test prune_to_prev_non_member/4 ***
prune_to_prev_non_member([], [], -5, -5).
prune_to_prev_non_member([], [], -1, -1).
prune_to_prev_non_member([], [], 0, 0).
prune_to_prev_non_member([], [], 1, 1).
prune_to_prev_non_member([], [], 5, 5).
prune_to_prev_non_member([[-1]], [], -5, -5).
prune_to_prev_non_member([[-1]], [], -1, -2).
prune_to_prev_non_member([[-1]], [[-1]], 0, 0).
prune_to_prev_non_member([[-1]], [[-1]], 1, 1).
prune_to_prev_non_member([[-1]], [[-1]], 5, 5).
prune_to_prev_non_member([[0]], [], -5, -5).
prune_to_prev_non_member([[0]], [], -1, -1).
prune_to_prev_non_member([[0]], [], 0, -1).
prune_to_prev_non_member([[0]], [[0]], 1, 1).
prune_to_prev_non_member([[0]], [[0]], 5, 5).
prune_to_prev_non_member([[1]], [], -5, -5).
prune_to_prev_non_member([[1]], [], -1, -1).
prune_to_prev_non_member([[1]], [], 0, 0).
prune_to_prev_non_member([[1]], [], 1, 0).
prune_to_prev_non_member([[1]], [[1]], 5, 5).
prune_to_prev_non_member([[-3 .. -1]], [], -5, -5).
prune_to_prev_non_member([[-3 .. -1]], [], -1, -4).
prune_to_prev_non_member([[-3 .. -1]], [[-3 .. -1]], 0, 0).
prune_to_prev_non_member([[-3 .. -1]], [[-3 .. -1]], 1, 1).
prune_to_prev_non_member([[-3 .. -1]], [[-3 .. -1]], 5, 5).
prune_to_prev_non_member([[-1 .. 1]], [], -5, -5).
prune_to_prev_non_member([[-1 .. 1]], [], -1, -2).
prune_to_prev_non_member([[-1 .. 1]], [], 0, -2).
prune_to_prev_non_member([[-1 .. 1]], [], 1, -2).
prune_to_prev_non_member([[-1 .. 1]], [[-1 .. 1]], 5, 5).
prune_to_prev_non_member([[1 .. 3]], [], -5, -5).
prune_to_prev_non_member([[1 .. 3]], [], -1, -1).
prune_to_prev_non_member([[1 .. 3]], [], 0, 0).
prune_to_prev_non_member([[1 .. 3]], [], 1, 0).
prune_to_prev_non_member([[1 .. 3]], [[1 .. 3]], 5, 5).
prune_to_prev_non_member([[-10 .. -7], [-3 .. -1]], [[-10 .. -7]], -5, -5).
prune_to_prev_non_member([[-10 .. -7], [-3 .. -1]], [[-10 .. -7]], -1, -4).
prune_to_prev_non_member([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]], 0, 0).
prune_to_prev_non_member([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]], 1, 1).
prune_to_prev_non_member([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]], 5, 5).
prune_to_prev_non_member([[1 .. 3], [7 .. 10]], [], -5, -5).
prune_to_prev_non_member([[1 .. 3], [7 .. 10]], [], -1, -1).
prune_to_prev_non_member([[1 .. 3], [7 .. 10]], [], 0, 0).
prune_to_prev_non_member([[1 .. 3], [7 .. 10]], [], 1, 0).
prune_to_prev_non_member([[1 .. 3], [7 .. 10]], [[1 .. 3]], 5, 5).
prune_to_prev_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7]], -5, -5).
prune_to_prev_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7]], -1, -2).
prune_to_prev_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7]], 0, -2).
prune_to_prev_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7]], 1, -2).
prune_to_prev_non_member([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-1 .. 1]], 5, 5).
prune_to_prev_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [], -5, -7).
prune_to_prev_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3]], -1, -2).
prune_to_prev_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3]], 0, -2).
prune_to_prev_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3]], 1, -2).
prune_to_prev_non_member([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3], [-1 .. 1]], 5, 2).
prune_to_prev_non_member([[-1], [1], [3], [5], [7], [9]], [], -5, -5).
prune_to_prev_non_member([[-1], [1], [3], [5], [7], [9]], [], -1, -2).
prune_to_prev_non_member([[-1], [1], [3], [5], [7], [9]], [[-1]], 0, 0).
prune_to_prev_non_member([[-1], [1], [3], [5], [7], [9]], [[-1]], 1, 0).
prune_to_prev_non_member([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3]], 5, 4).
*** Test from_list/1 ***
from_list([]) = []
from_list([min_int]) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
from_list([-1]) = [[-1]]
from_list([0]) = [[0]]
from_list([1]) = [[1]]
from_list([1, 2, 3]) = [[1 .. 3]]
from_list([3, 2, 1]) = [[1 .. 3]]
from_list([3, 3, 2, 2, 1, 1]) = [[1 .. 3]]
from_list([-10, 1, 2, 3, 10]) = [[-10], [1 .. 3], [10]]
from_list([1, 2, 3, 4, 5, 561, -1]) = [[-1], [1 .. 5], [561]]
*** Test from_set/1 ***
from_set(set([])) = []
from_set(set([min_int])) = <<exception: function `ranges.make_singleton_set'/1: cannot represent min_int>>
from_set(set([-1])) = [[-1]]
from_set(set([0])) = [[0]]
from_set(set([1])) = [[1]]
from_set(set([1, 2, 3])) = [[1 .. 3]]
from_set(set([-10, 1, 2, 3, 10])) = [[-10], [1 .. 3], [10]]
from_set(set([-1, 1, 2, 3, 4, 5, 561])) = [[-1], [1 .. 5], [561]]
*** Test to_sorted_list/1 ***
to_sorted_list([]) = []
to_sorted_list([[-1]]) = [-1]
to_sorted_list([[0]]) = [0]
to_sorted_list([[1]]) = [1]
to_sorted_list([[-3 .. -1]]) = [-3, -2, -1]
to_sorted_list([[-1 .. 1]]) = [-1, 0, 1]
to_sorted_list([[1 .. 3]]) = [1, 2, 3]
to_sorted_list([[-10 .. -7], [-3 .. -1]]) = [-10, -9, -8, -7, -3, -2, -1]
to_sorted_list([[1 .. 3], [7 .. 10]]) = [1, 2, 3, 7, 8, 9, 10]
to_sorted_list([[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [-10, -9, -8, -7, -1, 0, 1, 7, 8, 9, 10]
to_sorted_list([[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [-6, -5, -4, -3, -1, 0, 1, 3, 4, 5, 6]
to_sorted_list([[-1], [1], [3], [5], [7], [9]]) = [-1, 1, 3, 5, 7, 9]
*** Test count/1 ***
count([]) = 0
count([[-1]]) = 1
count([[0]]) = 1
count([[1]]) = 1
count([[-3 .. -1]]) = 3
count([[-1 .. 1]]) = 3
count([[1 .. 3]]) = 3
count([[-10 .. -7], [-3 .. -1]]) = 7
count([[1 .. 3], [7 .. 10]]) = 7
count([[-10 .. -7], [-1 .. 1], [7 .. 10]]) = 11
count([[-6 .. -3], [-1 .. 1], [3 .. 6]]) = 11
count([[-1], [1], [3], [5], [7], [9]]) = 6
*** Test median/1 ***
median([]) ===> <<exception: function `ranges.median'/1: empty set>>
median([[-1]]) ===> -1
median([[0]]) ===> 0
median([[1]]) ===> 1
median([[-3 .. -1]]) ===> -2
median([[-1 .. 1]]) ===> 0
median([[1 .. 3]]) ===> 2
median([[-10 .. -7], [-3 .. -1]]) ===> -7
median([[1 .. 3], [7 .. 10]]) ===> 7
median([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> 0
median([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> 0
median([[-1], [1], [3], [5], [7], [9]]) ===> 3
*** Test least/2 ***
least([]) ===> FAIL
least([[-1]]) ===> -1
least([[0]]) ===> 0
least([[1]]) ===> 1
least([[-3 .. -1]]) ===> -3
least([[-1 .. 1]]) ===> -1
least([[1 .. 3]]) ===> 1
least([[-10 .. -7], [-3 .. -1]]) ===> -10
least([[1 .. 3], [7 .. 10]]) ===> 1
least([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> -10
least([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> -6
least([[-1], [1], [3], [5], [7], [9]]) ===> -1
*** Test greatest/2 ***
greatest([]) ===> FAIL
greatest([[-1]]) ===> -1
greatest([[0]]) ===> 0
greatest([[1]]) ===> 1
greatest([[-3 .. -1]]) ===> -1
greatest([[-1 .. 1]]) ===> 1
greatest([[1 .. 3]]) ===> 3
greatest([[-10 .. -7], [-3 .. -1]]) ===> -1
greatest([[1 .. 3], [7 .. 10]]) ===> 10
greatest([[-10 .. -7], [-1 .. 1], [7 .. 10]]) ===> 10
greatest([[-6 .. -3], [-1 .. 1], [3 .. 6]]) ===> 6
greatest([[-1], [1], [3], [5], [7], [9]]) ===> 9
*** Test next/3 ***
next([], -11) ===> FAIL
next([], -1) ===> FAIL
next([], 0) ===> FAIL
next([], 1) ===> FAIL
next([], 11) ===> FAIL
next([[-1]], -11) ===> -1
next([[-1]], -1) ===> FAIL
next([[-1]], 0) ===> FAIL
next([[-1]], 1) ===> FAIL
next([[-1]], 11) ===> FAIL
next([[0]], -11) ===> 0
next([[0]], -1) ===> 0
next([[0]], 0) ===> FAIL
next([[0]], 1) ===> FAIL
next([[0]], 11) ===> FAIL
next([[1]], -11) ===> 1
next([[1]], -1) ===> 1
next([[1]], 0) ===> 1
next([[1]], 1) ===> FAIL
next([[1]], 11) ===> FAIL
next([[-3 .. -1]], -11) ===> -3
next([[-3 .. -1]], -1) ===> FAIL
next([[-3 .. -1]], 0) ===> FAIL
next([[-3 .. -1]], 1) ===> FAIL
next([[-3 .. -1]], 11) ===> FAIL
next([[-1 .. 1]], -11) ===> -1
next([[-1 .. 1]], -1) ===> 0
next([[-1 .. 1]], 0) ===> 1
next([[-1 .. 1]], 1) ===> FAIL
next([[-1 .. 1]], 11) ===> FAIL
next([[1 .. 3]], -11) ===> 1
next([[1 .. 3]], -1) ===> 1
next([[1 .. 3]], 0) ===> 1
next([[1 .. 3]], 1) ===> 2
next([[1 .. 3]], 11) ===> FAIL
next([[-10 .. -7], [-3 .. -1]], -11) ===> -10
next([[-10 .. -7], [-3 .. -1]], -1) ===> FAIL
next([[-10 .. -7], [-3 .. -1]], 0) ===> FAIL
next([[-10 .. -7], [-3 .. -1]], 1) ===> FAIL
next([[-10 .. -7], [-3 .. -1]], 11) ===> FAIL
next([[1 .. 3], [7 .. 10]], -11) ===> 1
next([[1 .. 3], [7 .. 10]], -1) ===> 1
next([[1 .. 3], [7 .. 10]], 0) ===> 1
next([[1 .. 3], [7 .. 10]], 1) ===> 2
next([[1 .. 3], [7 .. 10]], 11) ===> FAIL
next([[-10 .. -7], [-1 .. 1], [7 .. 10]], -11) ===> -10
next([[-10 .. -7], [-1 .. 1], [7 .. 10]], -1) ===> 0
next([[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) ===> 1
next([[-10 .. -7], [-1 .. 1], [7 .. 10]], 1) ===> 7
next([[-10 .. -7], [-1 .. 1], [7 .. 10]], 11) ===> FAIL
next([[-6 .. -3], [-1 .. 1], [3 .. 6]], -11) ===> -6
next([[-6 .. -3], [-1 .. 1], [3 .. 6]], -1) ===> 0
next([[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) ===> 1
next([[-6 .. -3], [-1 .. 1], [3 .. 6]], 1) ===> 3
next([[-6 .. -3], [-1 .. 1], [3 .. 6]], 11) ===> FAIL
next([[-1], [1], [3], [5], [7], [9]], -11) ===> -1
next([[-1], [1], [3], [5], [7], [9]], -1) ===> 1
next([[-1], [1], [3], [5], [7], [9]], 0) ===> 1
next([[-1], [1], [3], [5], [7], [9]], 1) ===> 3
next([[-1], [1], [3], [5], [7], [9]], 11) ===> FAIL
*** Test search_range/4 ***
search_range(-11, []) ==> FAIL
search_range(-1, []) ==> FAIL
search_range(0, []) ==> FAIL
search_range(1, []) ==> FAIL
search_range(11, []) ==> FAIL
search_range(1558, []) ==> FAIL
search_range(1560, []) ==> FAIL
search_range(8461, []) ==> FAIL
search_range(95586, []) ==> FAIL
search_range(100620, []) ==> FAIL
search_range(100621, []) ==> FAIL
search_range(-11, [[-1]]) ==> FAIL
search_range(-1, [[-1]]) ==> (-1, -1).
search_range(0, [[-1]]) ==> FAIL
search_range(1, [[-1]]) ==> FAIL
search_range(11, [[-1]]) ==> FAIL
search_range(1558, [[-1]]) ==> FAIL
search_range(1560, [[-1]]) ==> FAIL
search_range(8461, [[-1]]) ==> FAIL
search_range(95586, [[-1]]) ==> FAIL
search_range(100620, [[-1]]) ==> FAIL
search_range(100621, [[-1]]) ==> FAIL
search_range(-11, [[0]]) ==> FAIL
search_range(-1, [[0]]) ==> FAIL
search_range(0, [[0]]) ==> (0, 0).
search_range(1, [[0]]) ==> FAIL
search_range(11, [[0]]) ==> FAIL
search_range(1558, [[0]]) ==> FAIL
search_range(1560, [[0]]) ==> FAIL
search_range(8461, [[0]]) ==> FAIL
search_range(95586, [[0]]) ==> FAIL
search_range(100620, [[0]]) ==> FAIL
search_range(100621, [[0]]) ==> FAIL
search_range(-11, [[1]]) ==> FAIL
search_range(-1, [[1]]) ==> FAIL
search_range(0, [[1]]) ==> FAIL
search_range(1, [[1]]) ==> (1, 1).
search_range(11, [[1]]) ==> FAIL
search_range(1558, [[1]]) ==> FAIL
search_range(1560, [[1]]) ==> FAIL
search_range(8461, [[1]]) ==> FAIL
search_range(95586, [[1]]) ==> FAIL
search_range(100620, [[1]]) ==> FAIL
search_range(100621, [[1]]) ==> FAIL
search_range(-11, [[-3 .. -1]]) ==> FAIL
search_range(-1, [[-3 .. -1]]) ==> (-3, -1).
search_range(0, [[-3 .. -1]]) ==> FAIL
search_range(1, [[-3 .. -1]]) ==> FAIL
search_range(11, [[-3 .. -1]]) ==> FAIL
search_range(1558, [[-3 .. -1]]) ==> FAIL
search_range(1560, [[-3 .. -1]]) ==> FAIL
search_range(8461, [[-3 .. -1]]) ==> FAIL
search_range(95586, [[-3 .. -1]]) ==> FAIL
search_range(100620, [[-3 .. -1]]) ==> FAIL
search_range(100621, [[-3 .. -1]]) ==> FAIL
search_range(-11, [[-1 .. 1]]) ==> FAIL
search_range(-1, [[-1 .. 1]]) ==> (-1, 1).
search_range(0, [[-1 .. 1]]) ==> (-1, 1).
search_range(1, [[-1 .. 1]]) ==> (-1, 1).
search_range(11, [[-1 .. 1]]) ==> FAIL
search_range(1558, [[-1 .. 1]]) ==> FAIL
search_range(1560, [[-1 .. 1]]) ==> FAIL
search_range(8461, [[-1 .. 1]]) ==> FAIL
search_range(95586, [[-1 .. 1]]) ==> FAIL
search_range(100620, [[-1 .. 1]]) ==> FAIL
search_range(100621, [[-1 .. 1]]) ==> FAIL
search_range(-11, [[1 .. 3]]) ==> FAIL
search_range(-1, [[1 .. 3]]) ==> FAIL
search_range(0, [[1 .. 3]]) ==> FAIL
search_range(1, [[1 .. 3]]) ==> (1, 3).
search_range(11, [[1 .. 3]]) ==> FAIL
search_range(1558, [[1 .. 3]]) ==> FAIL
search_range(1560, [[1 .. 3]]) ==> FAIL
search_range(8461, [[1 .. 3]]) ==> FAIL
search_range(95586, [[1 .. 3]]) ==> FAIL
search_range(100620, [[1 .. 3]]) ==> FAIL
search_range(100621, [[1 .. 3]]) ==> FAIL
search_range(-11, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(-1, [[-10 .. -7], [-3 .. -1]]) ==> (-3, -1).
search_range(0, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(1, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(11, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(1558, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(1560, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(8461, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(95586, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(100620, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(100621, [[-10 .. -7], [-3 .. -1]]) ==> FAIL
search_range(-11, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(-1, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(0, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(1, [[1 .. 3], [7 .. 10]]) ==> (1, 3).
search_range(11, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(1558, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(1560, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(8461, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(95586, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(100620, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(100621, [[1 .. 3], [7 .. 10]]) ==> FAIL
search_range(-11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(-1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> (-1, 1).
search_range(0, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> (-1, 1).
search_range(1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> (-1, 1).
search_range(11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(1558, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(1560, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(8461, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(95586, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(100620, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(100621, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) ==> FAIL
search_range(-11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(-1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> (-1, 1).
search_range(0, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> (-1, 1).
search_range(1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> (-1, 1).
search_range(11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(1558, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(1560, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(8461, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(95586, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(100620, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(100621, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) ==> FAIL
search_range(-11, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(-1, [[-1], [1], [3], [5], [7], [9]]) ==> (-1, -1).
search_range(0, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(1, [[-1], [1], [3], [5], [7], [9]]) ==> (1, 1).
search_range(11, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(1558, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(1560, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(8461, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(95586, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(100620, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(100621, [[-1], [1], [3], [5], [7], [9]]) ==> FAIL
search_range(-11, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
search_range(-1, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
search_range(0, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
search_range(1, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
search_range(11, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
search_range(1558, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
search_range(1560, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> (1559, 8460).
search_range(8461, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
search_range(95586, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> (93719, 100620).
search_range(100620, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> (93719, 100620).
search_range(100621, [[1559 .. 8460], [43319 .. 48780], [93719 .. 100620]]) ==> FAIL
*** Test restrict_min/2 ***
restrict_min(-11, []) = []
restrict_min(-1, []) = []
restrict_min(0, []) = []
restrict_min(1, []) = []
restrict_min(3, []) = []
restrict_min(11, []) = []
restrict_min(-11, [[-1]]) = [[-1]]
restrict_min(-1, [[-1]]) = [[-1]]
restrict_min(0, [[-1]]) = []
restrict_min(1, [[-1]]) = []
restrict_min(3, [[-1]]) = []
restrict_min(11, [[-1]]) = []
restrict_min(-11, [[0]]) = [[0]]
restrict_min(-1, [[0]]) = [[0]]
restrict_min(0, [[0]]) = [[0]]
restrict_min(1, [[0]]) = []
restrict_min(3, [[0]]) = []
restrict_min(11, [[0]]) = []
restrict_min(-11, [[1]]) = [[1]]
restrict_min(-1, [[1]]) = [[1]]
restrict_min(0, [[1]]) = [[1]]
restrict_min(1, [[1]]) = [[1]]
restrict_min(3, [[1]]) = []
restrict_min(11, [[1]]) = []
restrict_min(-11, [[-3 .. -1]]) = [[-3 .. -1]]
restrict_min(-1, [[-3 .. -1]]) = [[-1]]
restrict_min(0, [[-3 .. -1]]) = []
restrict_min(1, [[-3 .. -1]]) = []
restrict_min(3, [[-3 .. -1]]) = []
restrict_min(11, [[-3 .. -1]]) = []
restrict_min(-11, [[-1 .. 1]]) = [[-1 .. 1]]
restrict_min(-1, [[-1 .. 1]]) = [[-1 .. 1]]
restrict_min(0, [[-1 .. 1]]) = [[0, 1]]
restrict_min(1, [[-1 .. 1]]) = [[1]]
restrict_min(3, [[-1 .. 1]]) = []
restrict_min(11, [[-1 .. 1]]) = []
restrict_min(-11, [[1 .. 3]]) = [[1 .. 3]]
restrict_min(-1, [[1 .. 3]]) = [[1 .. 3]]
restrict_min(0, [[1 .. 3]]) = [[1 .. 3]]
restrict_min(1, [[1 .. 3]]) = [[1 .. 3]]
restrict_min(3, [[1 .. 3]]) = [[3]]
restrict_min(11, [[1 .. 3]]) = []
restrict_min(-11, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
restrict_min(-1, [[-10 .. -7], [-3 .. -1]]) = [[-1]]
restrict_min(0, [[-10 .. -7], [-3 .. -1]]) = []
restrict_min(1, [[-10 .. -7], [-3 .. -1]]) = []
restrict_min(3, [[-10 .. -7], [-3 .. -1]]) = []
restrict_min(11, [[-10 .. -7], [-3 .. -1]]) = []
restrict_min(-11, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
restrict_min(-1, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
restrict_min(0, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
restrict_min(1, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
restrict_min(3, [[1 .. 3], [7 .. 10]]) = [[3], [7 .. 10]]
restrict_min(11, [[1 .. 3], [7 .. 10]]) = []
restrict_min(-11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
restrict_min(-1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-1 .. 1], [7 .. 10]]
restrict_min(0, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[0, 1], [7 .. 10]]
restrict_min(1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[1], [7 .. 10]]
restrict_min(3, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[7 .. 10]]
restrict_min(11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
restrict_min(-11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
restrict_min(-1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-1 .. 1], [3 .. 6]]
restrict_min(0, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[0, 1], [3 .. 6]]
restrict_min(1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[1], [3 .. 6]]
restrict_min(3, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[3 .. 6]]
restrict_min(11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
restrict_min(-11, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
restrict_min(-1, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
restrict_min(0, [[-1], [1], [3], [5], [7], [9]]) = [[1], [3], [5], [7], [9]]
restrict_min(1, [[-1], [1], [3], [5], [7], [9]]) = [[1], [3], [5], [7], [9]]
restrict_min(3, [[-1], [1], [3], [5], [7], [9]]) = [[3], [5], [7], [9]]
restrict_min(11, [[-1], [1], [3], [5], [7], [9]]) = []
*** Test restrict_max/2 ***
restrict_max(-11, []) = []
restrict_max(-1, []) = []
restrict_max(1, []) = []
restrict_max(3, []) = []
restrict_max(11, []) = []
restrict_max(-11, [[-1]]) = []
restrict_max(-1, [[-1]]) = [[-1]]
restrict_max(1, [[-1]]) = [[-1]]
restrict_max(3, [[-1]]) = [[-1]]
restrict_max(11, [[-1]]) = [[-1]]
restrict_max(-11, [[0]]) = []
restrict_max(-1, [[0]]) = []
restrict_max(1, [[0]]) = [[0]]
restrict_max(3, [[0]]) = [[0]]
restrict_max(11, [[0]]) = [[0]]
restrict_max(-11, [[1]]) = []
restrict_max(-1, [[1]]) = []
restrict_max(1, [[1]]) = [[1]]
restrict_max(3, [[1]]) = [[1]]
restrict_max(11, [[1]]) = [[1]]
restrict_max(-11, [[-3 .. -1]]) = []
restrict_max(-1, [[-3 .. -1]]) = [[-3 .. -1]]
restrict_max(1, [[-3 .. -1]]) = [[-3 .. -1]]
restrict_max(3, [[-3 .. -1]]) = [[-3 .. -1]]
restrict_max(11, [[-3 .. -1]]) = [[-3 .. -1]]
restrict_max(-11, [[-1 .. 1]]) = []
restrict_max(-1, [[-1 .. 1]]) = [[-1]]
restrict_max(1, [[-1 .. 1]]) = [[-1 .. 1]]
restrict_max(3, [[-1 .. 1]]) = [[-1 .. 1]]
restrict_max(11, [[-1 .. 1]]) = [[-1 .. 1]]
restrict_max(-11, [[1 .. 3]]) = []
restrict_max(-1, [[1 .. 3]]) = []
restrict_max(1, [[1 .. 3]]) = [[1]]
restrict_max(3, [[1 .. 3]]) = [[1 .. 3]]
restrict_max(11, [[1 .. 3]]) = [[1 .. 3]]
restrict_max(-11, [[-10 .. -7], [-3 .. -1]]) = []
restrict_max(-1, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
restrict_max(1, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
restrict_max(3, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
restrict_max(11, [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
restrict_max(-11, [[1 .. 3], [7 .. 10]]) = []
restrict_max(-1, [[1 .. 3], [7 .. 10]]) = []
restrict_max(1, [[1 .. 3], [7 .. 10]]) = [[1]]
restrict_max(3, [[1 .. 3], [7 .. 10]]) = [[1 .. 3]]
restrict_max(11, [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
restrict_max(-11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
restrict_max(-1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1]]
restrict_max(1, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1]]
restrict_max(3, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1]]
restrict_max(11, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
restrict_max(-11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
restrict_max(-1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1]]
restrict_max(1, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1]]
restrict_max(3, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3]]
restrict_max(11, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
restrict_max(-11, [[-1], [1], [3], [5], [7], [9]]) = []
restrict_max(-1, [[-1], [1], [3], [5], [7], [9]]) = [[-1]]
restrict_max(1, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1]]
restrict_max(3, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3]]
restrict_max(11, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
*** Test restrict_range/3 ***
restrict_range(0, 0, []) = []
restrict_range(1, 3, []) = []
restrict_range(-2, 2, []) = []
restrict_range(0, 0, [[-1]]) = []
restrict_range(1, 3, [[-1]]) = []
restrict_range(-2, 2, [[-1]]) = [[-1]]
restrict_range(0, 0, [[0]]) = [[0]]
restrict_range(1, 3, [[0]]) = []
restrict_range(-2, 2, [[0]]) = [[0]]
restrict_range(0, 0, [[1]]) = []
restrict_range(1, 3, [[1]]) = [[1]]
restrict_range(-2, 2, [[1]]) = [[1]]
restrict_range(0, 0, [[-3 .. -1]]) = []
restrict_range(1, 3, [[-3 .. -1]]) = []
restrict_range(-2, 2, [[-3 .. -1]]) = [[-2, -1]]
restrict_range(0, 0, [[-1 .. 1]]) = [[0]]
restrict_range(1, 3, [[-1 .. 1]]) = [[1]]
restrict_range(-2, 2, [[-1 .. 1]]) = [[-1 .. 1]]
restrict_range(0, 0, [[1 .. 3]]) = []
restrict_range(1, 3, [[1 .. 3]]) = [[1 .. 3]]
restrict_range(-2, 2, [[1 .. 3]]) = [[1, 2]]
restrict_range(0, 0, [[-10 .. -7], [-3 .. -1]]) = []
restrict_range(1, 3, [[-10 .. -7], [-3 .. -1]]) = []
restrict_range(-2, 2, [[-10 .. -7], [-3 .. -1]]) = [[-2, -1]]
restrict_range(0, 0, [[1 .. 3], [7 .. 10]]) = []
restrict_range(1, 3, [[1 .. 3], [7 .. 10]]) = [[1 .. 3]]
restrict_range(-2, 2, [[1 .. 3], [7 .. 10]]) = [[1, 2]]
restrict_range(0, 0, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[0]]
restrict_range(1, 3, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[1]]
restrict_range(-2, 2, [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-1 .. 1]]
restrict_range(0, 0, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[0]]
restrict_range(1, 3, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[1], [3]]
restrict_range(-2, 2, [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-1 .. 1]]
restrict_range(0, 0, [[-1], [1], [3], [5], [7], [9]]) = []
restrict_range(1, 3, [[-1], [1], [3], [5], [7], [9]]) = [[1], [3]]
restrict_range(-2, 2, [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1]]
*** Test negate/1 ***
negate([]) = []
negate([[-1]]) = [[1]]
negate([[0]]) = [[0]]
negate([[1]]) = [[-1]]
negate([[-3 .. -1]]) = [[1 .. 3]]
negate([[-1 .. 1]]) = [[-1 .. 1]]
negate([[1 .. 3]]) = [[-3 .. -1]]
negate([[-10 .. -7], [-3 .. -1]]) = [[1 .. 3], [7 .. 10]]
negate([[1 .. 3], [7 .. 10]]) = [[-10 .. -7], [-3 .. -1]]
negate([[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
negate([[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
negate([[-1], [1], [3], [5], [7], [9]]) = [[-9], [-7], [-5], [-3], [-1], [1]]
*** Test plus/2 ***
plus([], []) = []
plus([], [[-1]]) = []
plus([], [[0]]) = []
plus([], [[1]]) = []
plus([], [[-3 .. -1]]) = []
plus([], [[-1 .. 1]]) = []
plus([], [[1 .. 3]]) = []
plus([], [[-10 .. -7], [-3 .. -1]]) = []
plus([], [[1 .. 3], [7 .. 10]]) = []
plus([], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = []
plus([], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = []
plus([], [[-1], [1], [3], [5], [7], [9]]) = []
plus([[-1]], []) = []
plus([[-1]], [[-1]]) = [[-2]]
plus([[-1]], [[0]]) = [[-1]]
plus([[-1]], [[1]]) = [[0]]
plus([[-1]], [[-3 .. -1]]) = [[-4 .. -2]]
plus([[-1]], [[-1 .. 1]]) = [[-2 .. 0]]
plus([[-1]], [[1 .. 3]]) = [[0 .. 2]]
plus([[-1]], [[-10 .. -7], [-3 .. -1]]) = [[-11 .. -8], [-4 .. -2]]
plus([[-1]], [[1 .. 3], [7 .. 10]]) = [[0 .. 2], [6 .. 9]]
plus([[-1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-11 .. -8], [-2 .. 0], [6 .. 9]]
plus([[-1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-7 .. -4], [-2 .. 0], [2 .. 5]]
plus([[-1]], [[-1], [1], [3], [5], [7], [9]]) = [[-2], [0], [2], [4], [6], [8]]
plus([[0]], []) = []
plus([[0]], [[-1]]) = [[-1]]
plus([[0]], [[0]]) = [[0]]
plus([[0]], [[1]]) = [[1]]
plus([[0]], [[-3 .. -1]]) = [[-3 .. -1]]
plus([[0]], [[-1 .. 1]]) = [[-1 .. 1]]
plus([[0]], [[1 .. 3]]) = [[1 .. 3]]
plus([[0]], [[-10 .. -7], [-3 .. -1]]) = [[-10 .. -7], [-3 .. -1]]
plus([[0]], [[1 .. 3], [7 .. 10]]) = [[1 .. 3], [7 .. 10]]
plus([[0]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
plus([[0]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
plus([[0]], [[-1], [1], [3], [5], [7], [9]]) = [[-1], [1], [3], [5], [7], [9]]
plus([[1]], []) = []
plus([[1]], [[-1]]) = [[0]]
plus([[1]], [[0]]) = [[1]]
plus([[1]], [[1]]) = [[2]]
plus([[1]], [[-3 .. -1]]) = [[-2 .. 0]]
plus([[1]], [[-1 .. 1]]) = [[0 .. 2]]
plus([[1]], [[1 .. 3]]) = [[2 .. 4]]
plus([[1]], [[-10 .. -7], [-3 .. -1]]) = [[-9 .. -6], [-2 .. 0]]
plus([[1]], [[1 .. 3], [7 .. 10]]) = [[2 .. 4], [8 .. 11]]
plus([[1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-9 .. -6], [0 .. 2], [8 .. 11]]
plus([[1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-5 .. -2], [0 .. 2], [4 .. 7]]
plus([[1]], [[-1], [1], [3], [5], [7], [9]]) = [[0], [2], [4], [6], [8], [10]]
plus([[-3 .. -1]], []) = []
plus([[-3 .. -1]], [[-1]]) = [[-4 .. -2]]
plus([[-3 .. -1]], [[0]]) = [[-3 .. -1]]
plus([[-3 .. -1]], [[1]]) = [[-2 .. 0]]
plus([[-3 .. -1]], [[-3 .. -1]]) = [[-6 .. -2]]
plus([[-3 .. -1]], [[-1 .. 1]]) = [[-4 .. 0]]
plus([[-3 .. -1]], [[1 .. 3]]) = [[-2 .. 2]]
plus([[-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = [[-13 .. -8], [-6 .. -2]]
plus([[-3 .. -1]], [[1 .. 3], [7 .. 10]]) = [[-2 .. 2], [4 .. 9]]
plus([[-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-13 .. -8], [-4 .. 0], [4 .. 9]]
plus([[-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-9 .. 5]]
plus([[-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-4 .. 8]]
plus([[-1 .. 1]], []) = []
plus([[-1 .. 1]], [[-1]]) = [[-2 .. 0]]
plus([[-1 .. 1]], [[0]]) = [[-1 .. 1]]
plus([[-1 .. 1]], [[1]]) = [[0 .. 2]]
plus([[-1 .. 1]], [[-3 .. -1]]) = [[-4 .. 0]]
plus([[-1 .. 1]], [[-1 .. 1]]) = [[-2 .. 2]]
plus([[-1 .. 1]], [[1 .. 3]]) = [[0 .. 4]]
plus([[-1 .. 1]], [[-10 .. -7], [-3 .. -1]]) = [[-11 .. -6], [-4 .. 0]]
plus([[-1 .. 1]], [[1 .. 3], [7 .. 10]]) = [[0 .. 4], [6 .. 11]]
plus([[-1 .. 1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-11 .. -6], [-2 .. 2], [6 .. 11]]
plus([[-1 .. 1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-7 .. 7]]
plus([[-1 .. 1]], [[-1], [1], [3], [5], [7], [9]]) = [[-2 .. 10]]
plus([[1 .. 3]], []) = []
plus([[1 .. 3]], [[-1]]) = [[0 .. 2]]
plus([[1 .. 3]], [[0]]) = [[1 .. 3]]
plus([[1 .. 3]], [[1]]) = [[2 .. 4]]
plus([[1 .. 3]], [[-3 .. -1]]) = [[-2 .. 2]]
plus([[1 .. 3]], [[-1 .. 1]]) = [[0 .. 4]]
plus([[1 .. 3]], [[1 .. 3]]) = [[2 .. 6]]
plus([[1 .. 3]], [[-10 .. -7], [-3 .. -1]]) = [[-9 .. -4], [-2 .. 2]]
plus([[1 .. 3]], [[1 .. 3], [7 .. 10]]) = [[2 .. 6], [8 .. 13]]
plus([[1 .. 3]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-9 .. -4], [0 .. 4], [8 .. 13]]
plus([[1 .. 3]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-5 .. 9]]
plus([[1 .. 3]], [[-1], [1], [3], [5], [7], [9]]) = [[0 .. 12]]
plus([[-10 .. -7], [-3 .. -1]], []) = []
plus([[-10 .. -7], [-3 .. -1]], [[-1]]) = [[-11 .. -8], [-4 .. -2]]
plus([[-10 .. -7], [-3 .. -1]], [[0]]) = [[-10 .. -7], [-3 .. -1]]
plus([[-10 .. -7], [-3 .. -1]], [[1]]) = [[-9 .. -6], [-2 .. 0]]
plus([[-10 .. -7], [-3 .. -1]], [[-3 .. -1]]) = [[-13 .. -8], [-6 .. -2]]
plus([[-10 .. -7], [-3 .. -1]], [[-1 .. 1]]) = [[-11 .. -6], [-4 .. 0]]
plus([[-10 .. -7], [-3 .. -1]], [[1 .. 3]]) = [[-9 .. -4], [-2 .. 2]]
plus([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-3 .. -1]]) = [[-20 .. -8], [-6 .. -2]]
plus([[-10 .. -7], [-3 .. -1]], [[1 .. 3], [7 .. 10]]) = [[-9 .. 9]]
plus([[-10 .. -7], [-3 .. -1]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-20 .. -6], [-4 .. 9]]
plus([[-10 .. -7], [-3 .. -1]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-16 .. 5]]
plus([[-10 .. -7], [-3 .. -1]], [[-1], [1], [3], [5], [7], [9]]) = [[-11 .. 8]]
plus([[1 .. 3], [7 .. 10]], []) = []
plus([[1 .. 3], [7 .. 10]], [[-1]]) = [[0 .. 2], [6 .. 9]]
plus([[1 .. 3], [7 .. 10]], [[0]]) = [[1 .. 3], [7 .. 10]]
plus([[1 .. 3], [7 .. 10]], [[1]]) = [[2 .. 4], [8 .. 11]]
plus([[1 .. 3], [7 .. 10]], [[-3 .. -1]]) = [[-2 .. 2], [4 .. 9]]
plus([[1 .. 3], [7 .. 10]], [[-1 .. 1]]) = [[0 .. 4], [6 .. 11]]
plus([[1 .. 3], [7 .. 10]], [[1 .. 3]]) = [[2 .. 6], [8 .. 13]]
plus([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = [[-9 .. 9]]
plus([[1 .. 3], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = [[2 .. 6], [8 .. 20]]
plus([[1 .. 3], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-9 .. 4], [6 .. 20]]
plus([[1 .. 3], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-5 .. 16]]
plus([[1 .. 3], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[0 .. 19]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], []) = []
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1]]) = [[-11 .. -8], [-2 .. 0], [6 .. 9]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[0]]) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1]]) = [[-9 .. -6], [0 .. 2], [8 .. 11]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-3 .. -1]]) = [[-13 .. -8], [-4 .. 0], [4 .. 9]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1 .. 1]]) = [[-11 .. -6], [-2 .. 2], [6 .. 11]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3]]) = [[-9 .. -4], [0 .. 4], [8 .. 13]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-3 .. -1]]) = [[-20 .. -6], [-4 .. 9]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[1 .. 3], [7 .. 10]]) = [[-9 .. 4], [6 .. 20]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-20 .. -14], [-11 .. -6], [-3 .. 3], [6 .. 11], [14 .. 20]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-16 .. 16]]
plus([[-10 .. -7], [-1 .. 1], [7 .. 10]], [[-1], [1], [3], [5], [7], [9]]) = [[-11 .. 19]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], []) = []
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1]]) = [[-7 .. -4], [-2 .. 0], [2 .. 5]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[0]]) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1]]) = [[-5 .. -2], [0 .. 2], [4 .. 7]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-3 .. -1]]) = [[-9 .. 5]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1 .. 1]]) = [[-7 .. 7]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3]]) = [[-5 .. 9]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-3 .. -1]]) = [[-16 .. 5]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[1 .. 3], [7 .. 10]]) = [[-5 .. 16]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-16 .. 16]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-12 .. 12]]
plus([[-6 .. -3], [-1 .. 1], [3 .. 6]], [[-1], [1], [3], [5], [7], [9]]) = [[-7 .. 15]]
plus([[-1], [1], [3], [5], [7], [9]], []) = []
plus([[-1], [1], [3], [5], [7], [9]], [[-1]]) = [[-2], [0], [2], [4], [6], [8]]
plus([[-1], [1], [3], [5], [7], [9]], [[0]]) = [[-1], [1], [3], [5], [7], [9]]
plus([[-1], [1], [3], [5], [7], [9]], [[1]]) = [[0], [2], [4], [6], [8], [10]]
plus([[-1], [1], [3], [5], [7], [9]], [[-3 .. -1]]) = [[-4 .. 8]]
plus([[-1], [1], [3], [5], [7], [9]], [[-1 .. 1]]) = [[-2 .. 10]]
plus([[-1], [1], [3], [5], [7], [9]], [[1 .. 3]]) = [[0 .. 12]]
plus([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-3 .. -1]]) = [[-11 .. 8]]
plus([[-1], [1], [3], [5], [7], [9]], [[1 .. 3], [7 .. 10]]) = [[0 .. 19]]
plus([[-1], [1], [3], [5], [7], [9]], [[-10 .. -7], [-1 .. 1], [7 .. 10]]) = [[-11 .. 19]]
plus([[-1], [1], [3], [5], [7], [9]], [[-6 .. -3], [-1 .. 1], [3 .. 6]]) = [[-7 .. 15]]
plus([[-1], [1], [3], [5], [7], [9]], [[-1], [1], [3], [5], [7], [9]]) = [[-2], [0], [2], [4], [6], [8], [10], [12], [14], [16], [18]]
*** Test shift/2 ***
shift([], -2) = []
shift([[-1]], -2) = [[-3]]
shift([[0]], -2) = [[-2]]
shift([[1]], -2) = [[-1]]
shift([[-3 .. -1]], -2) = [[-5 .. -3]]
shift([[-1 .. 1]], -2) = [[-3 .. -1]]
shift([[1 .. 3]], -2) = [[-1 .. 1]]
shift([[-10 .. -7], [-3 .. -1]], -2) = [[-12 .. -9], [-5 .. -3]]
shift([[1 .. 3], [7 .. 10]], -2) = [[-1 .. 1], [5 .. 8]]
shift([[-10 .. -7], [-1 .. 1], [7 .. 10]], -2) = [[-12 .. -9], [-3 .. -1], [5 .. 8]]
shift([[-6 .. -3], [-1 .. 1], [3 .. 6]], -2) = [[-8 .. -5], [-3 .. -1], [1 .. 4]]
shift([[-1], [1], [3], [5], [7], [9]], -2) = [[-3], [-1], [1], [3], [5], [7]]
shift([], -1) = []
shift([[-1]], -1) = [[-2]]
shift([[0]], -1) = [[-1]]
shift([[1]], -1) = [[0]]
shift([[-3 .. -1]], -1) = [[-4 .. -2]]
shift([[-1 .. 1]], -1) = [[-2 .. 0]]
shift([[1 .. 3]], -1) = [[0 .. 2]]
shift([[-10 .. -7], [-3 .. -1]], -1) = [[-11 .. -8], [-4 .. -2]]
shift([[1 .. 3], [7 .. 10]], -1) = [[0 .. 2], [6 .. 9]]
shift([[-10 .. -7], [-1 .. 1], [7 .. 10]], -1) = [[-11 .. -8], [-2 .. 0], [6 .. 9]]
shift([[-6 .. -3], [-1 .. 1], [3 .. 6]], -1) = [[-7 .. -4], [-2 .. 0], [2 .. 5]]
shift([[-1], [1], [3], [5], [7], [9]], -1) = [[-2], [0], [2], [4], [6], [8]]
shift([], 0) = []
shift([[-1]], 0) = [[-1]]
shift([[0]], 0) = [[0]]
shift([[1]], 0) = [[1]]
shift([[-3 .. -1]], 0) = [[-3 .. -1]]
shift([[-1 .. 1]], 0) = [[-1 .. 1]]
shift([[1 .. 3]], 0) = [[1 .. 3]]
shift([[-10 .. -7], [-3 .. -1]], 0) = [[-10 .. -7], [-3 .. -1]]
shift([[1 .. 3], [7 .. 10]], 0) = [[1 .. 3], [7 .. 10]]
shift([[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
shift([[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
shift([[-1], [1], [3], [5], [7], [9]], 0) = [[-1], [1], [3], [5], [7], [9]]
shift([], -1) = []
shift([[-1]], -1) = [[-2]]
shift([[0]], -1) = [[-1]]
shift([[1]], -1) = [[0]]
shift([[-3 .. -1]], -1) = [[-4 .. -2]]
shift([[-1 .. 1]], -1) = [[-2 .. 0]]
shift([[1 .. 3]], -1) = [[0 .. 2]]
shift([[-10 .. -7], [-3 .. -1]], -1) = [[-11 .. -8], [-4 .. -2]]
shift([[1 .. 3], [7 .. 10]], -1) = [[0 .. 2], [6 .. 9]]
shift([[-10 .. -7], [-1 .. 1], [7 .. 10]], -1) = [[-11 .. -8], [-2 .. 0], [6 .. 9]]
shift([[-6 .. -3], [-1 .. 1], [3 .. 6]], -1) = [[-7 .. -4], [-2 .. 0], [2 .. 5]]
shift([[-1], [1], [3], [5], [7], [9]], -1) = [[-2], [0], [2], [4], [6], [8]]
shift([], 2) = []
shift([[-1]], 2) = [[1]]
shift([[0]], 2) = [[2]]
shift([[1]], 2) = [[3]]
shift([[-3 .. -1]], 2) = [[-1 .. 1]]
shift([[-1 .. 1]], 2) = [[1 .. 3]]
shift([[1 .. 3]], 2) = [[3 .. 5]]
shift([[-10 .. -7], [-3 .. -1]], 2) = [[-8 .. -5], [-1 .. 1]]
shift([[1 .. 3], [7 .. 10]], 2) = [[3 .. 5], [9 .. 12]]
shift([[-10 .. -7], [-1 .. 1], [7 .. 10]], 2) = [[-8 .. -5], [1 .. 3], [9 .. 12]]
shift([[-6 .. -3], [-1 .. 1], [3 .. 6]], 2) = [[-4 .. -1], [1 .. 3], [5 .. 8]]
shift([[-1], [1], [3], [5], [7], [9]], 2) = [[1], [3], [5], [7], [9], [11]]
*** Test dilation/2 ***
dilation([], -2) = []
dilation([[-1]], -2) = [[2]]
dilation([[0]], -2) = [[0]]
dilation([[1]], -2) = [[-2]]
dilation([[-3 .. -1]], -2) = [[2], [4], [6]]
dilation([[-1 .. 1]], -2) = [[-2], [0], [2]]
dilation([[1 .. 3]], -2) = [[-6], [-4], [-2]]
dilation([[-10 .. -7], [-3 .. -1]], -2) = [[2], [4], [6], [14], [16], [18], [20]]
dilation([[1 .. 3], [7 .. 10]], -2) = [[-20], [-18], [-16], [-14], [-6], [-4], [-2]]
dilation([[-10 .. -7], [-1 .. 1], [7 .. 10]], -2) = [[-20], [-18], [-16], [-14], [-2], [0], [2], [14], [16], [18], [20]]
dilation([[-6 .. -3], [-1 .. 1], [3 .. 6]], -2) = [[-12], [-10], [-8], [-6], [-2], [0], [2], [6], [8], [10], [12]]
dilation([[-1], [1], [3], [5], [7], [9]], -2) = [[-18], [-14], [-10], [-6], [-2], [2]]
dilation([], -1) = []
dilation([[-1]], -1) = [[1]]
dilation([[0]], -1) = [[0]]
dilation([[1]], -1) = [[-1]]
dilation([[-3 .. -1]], -1) = [[1 .. 3]]
dilation([[-1 .. 1]], -1) = [[-1 .. 1]]
dilation([[1 .. 3]], -1) = [[-3 .. -1]]
dilation([[-10 .. -7], [-3 .. -1]], -1) = [[1 .. 3], [7 .. 10]]
dilation([[1 .. 3], [7 .. 10]], -1) = [[-10 .. -7], [-3 .. -1]]
dilation([[-10 .. -7], [-1 .. 1], [7 .. 10]], -1) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
dilation([[-6 .. -3], [-1 .. 1], [3 .. 6]], -1) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
dilation([[-1], [1], [3], [5], [7], [9]], -1) = [[-9], [-7], [-5], [-3], [-1], [1]]
dilation([], 0) = []
dilation([[-1]], 0) = [[0]]
dilation([[0]], 0) = [[0]]
dilation([[1]], 0) = [[0]]
dilation([[-3 .. -1]], 0) = [[0]]
dilation([[-1 .. 1]], 0) = [[0]]
dilation([[1 .. 3]], 0) = [[0]]
dilation([[-10 .. -7], [-3 .. -1]], 0) = [[0]]
dilation([[1 .. 3], [7 .. 10]], 0) = [[0]]
dilation([[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) = [[0]]
dilation([[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) = [[0]]
dilation([[-1], [1], [3], [5], [7], [9]], 0) = [[0]]
dilation([], -1) = []
dilation([[-1]], -1) = [[1]]
dilation([[0]], -1) = [[0]]
dilation([[1]], -1) = [[-1]]
dilation([[-3 .. -1]], -1) = [[1 .. 3]]
dilation([[-1 .. 1]], -1) = [[-1 .. 1]]
dilation([[1 .. 3]], -1) = [[-3 .. -1]]
dilation([[-10 .. -7], [-3 .. -1]], -1) = [[1 .. 3], [7 .. 10]]
dilation([[1 .. 3], [7 .. 10]], -1) = [[-10 .. -7], [-3 .. -1]]
dilation([[-10 .. -7], [-1 .. 1], [7 .. 10]], -1) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
dilation([[-6 .. -3], [-1 .. 1], [3 .. 6]], -1) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
dilation([[-1], [1], [3], [5], [7], [9]], -1) = [[-9], [-7], [-5], [-3], [-1], [1]]
dilation([], 2) = []
dilation([[-1]], 2) = [[-2]]
dilation([[0]], 2) = [[0]]
dilation([[1]], 2) = [[2]]
dilation([[-3 .. -1]], 2) = [[-6], [-4], [-2]]
dilation([[-1 .. 1]], 2) = [[-2], [0], [2]]
dilation([[1 .. 3]], 2) = [[2], [4], [6]]
dilation([[-10 .. -7], [-3 .. -1]], 2) = [[-20], [-18], [-16], [-14], [-6], [-4], [-2]]
dilation([[1 .. 3], [7 .. 10]], 2) = [[2], [4], [6], [14], [16], [18], [20]]
dilation([[-10 .. -7], [-1 .. 1], [7 .. 10]], 2) = [[-20], [-18], [-16], [-14], [-2], [0], [2], [14], [16], [18], [20]]
dilation([[-6 .. -3], [-1 .. 1], [3 .. 6]], 2) = [[-12], [-10], [-8], [-6], [-2], [0], [2], [6], [8], [10], [12]]
dilation([[-1], [1], [3], [5], [7], [9]], 2) = [[-2], [2], [6], [10], [14], [18]]
*** Test contraction/2 ***
contraction([], -2) = []
contraction([[-1]], -2) = [[1 .. 0]]
contraction([[0]], -2) = [[0]]
contraction([[1]], -2) = [[0 .. -1]]
contraction([[-3 .. -1]], -2) = [[1]]
contraction([[-1 .. 1]], -2) = [[0]]
contraction([[1 .. 3]], -2) = [[-1]]
contraction([[-10 .. -7], [-3 .. -1]], -2) = [[1], [4, 5]]
contraction([[1 .. 3], [7 .. 10]], -2) = [[-5, -4], [-1]]
contraction([[-10 .. -7], [-1 .. 1], [7 .. 10]], -2) = [[-5, -4], [0], [4, 5]]
contraction([[-6 .. -3], [-1 .. 1], [3 .. 6]], -2) = [[-3, -2], [0], [2, 3]]
contraction([[-1], [1], [3], [5], [7], [9]], -2) = [[-4 .. -5], [-3 .. -4], [-2 .. -3], [-1 .. -2], [0 .. -1], [1 .. 0]]
contraction([], -1) = []
contraction([[-1]], -1) = [[1]]
contraction([[0]], -1) = [[0]]
contraction([[1]], -1) = [[-1]]
contraction([[-3 .. -1]], -1) = [[1 .. 3]]
contraction([[-1 .. 1]], -1) = [[-1 .. 1]]
contraction([[1 .. 3]], -1) = [[-3 .. -1]]
contraction([[-10 .. -7], [-3 .. -1]], -1) = [[1 .. 3], [7 .. 10]]
contraction([[1 .. 3], [7 .. 10]], -1) = [[-10 .. -7], [-3 .. -1]]
contraction([[-10 .. -7], [-1 .. 1], [7 .. 10]], -1) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
contraction([[-6 .. -3], [-1 .. 1], [3 .. 6]], -1) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
contraction([[-1], [1], [3], [5], [7], [9]], -1) = [[-9], [-7], [-5], [-3], [-1], [1]]
contraction([], 0) = []
contraction([[-1]], 0) = [[0]]
contraction([[0]], 0) = [[0]]
contraction([[1]], 0) = [[0]]
contraction([[-3 .. -1]], 0) = [[0]]
contraction([[-1 .. 1]], 0) = [[0]]
contraction([[1 .. 3]], 0) = [[0]]
contraction([[-10 .. -7], [-3 .. -1]], 0) = [[0]]
contraction([[1 .. 3], [7 .. 10]], 0) = [[0]]
contraction([[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) = [[0]]
contraction([[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) = [[0]]
contraction([[-1], [1], [3], [5], [7], [9]], 0) = [[0]]
contraction([], -1) = []
contraction([[-1]], -1) = [[1]]
contraction([[0]], -1) = [[0]]
contraction([[1]], -1) = [[-1]]
contraction([[-3 .. -1]], -1) = [[1 .. 3]]
contraction([[-1 .. 1]], -1) = [[-1 .. 1]]
contraction([[1 .. 3]], -1) = [[-3 .. -1]]
contraction([[-10 .. -7], [-3 .. -1]], -1) = [[1 .. 3], [7 .. 10]]
contraction([[1 .. 3], [7 .. 10]], -1) = [[-10 .. -7], [-3 .. -1]]
contraction([[-10 .. -7], [-1 .. 1], [7 .. 10]], -1) = [[-10 .. -7], [-1 .. 1], [7 .. 10]]
contraction([[-6 .. -3], [-1 .. 1], [3 .. 6]], -1) = [[-6 .. -3], [-1 .. 1], [3 .. 6]]
contraction([[-1], [1], [3], [5], [7], [9]], -1) = [[-9], [-7], [-5], [-3], [-1], [1]]
contraction([], 2) = []
contraction([[-1]], 2) = [[0 .. -1]]
contraction([[0]], 2) = [[0]]
contraction([[1]], 2) = [[1 .. 0]]
contraction([[-3 .. -1]], 2) = [[-1]]
contraction([[-1 .. 1]], 2) = [[0]]
contraction([[1 .. 3]], 2) = [[1]]
contraction([[-10 .. -7], [-3 .. -1]], 2) = [[-5, -4], [-1]]
contraction([[1 .. 3], [7 .. 10]], 2) = [[1], [4, 5]]
contraction([[-10 .. -7], [-1 .. 1], [7 .. 10]], 2) = [[-5, -4], [0], [4, 5]]
contraction([[-6 .. -3], [-1 .. 1], [3 .. 6]], 2) = [[-3, -2], [0], [2, 3]]
contraction([[-1], [1], [3], [5], [7], [9]], 2) = [[0 .. -1], [1 .. 0], [2 .. 1], [3 .. 2], [4 .. 3], [5 .. 4]]
*** Test foldl/4 ***
foldl(foldl_tester, [], 0) ===> []
foldl(foldl_tester, [[-1]], 0) ===> [-1]
foldl(foldl_tester, [[0]], 0) ===> [0]
foldl(foldl_tester, [[1]], 0) ===> [1]
foldl(foldl_tester, [[-3 .. -1]], 0) ===> [-1, -2, -3]
foldl(foldl_tester, [[-1 .. 1]], 0) ===> [1, 0, -1]
foldl(foldl_tester, [[1 .. 3]], 0) ===> [3, 2, 1]
foldl(foldl_tester, [[-10 .. -7], [-3 .. -1]], 0) ===> [-1, -2, -3, -7, -8, -9, -10]
foldl(foldl_tester, [[1 .. 3], [7 .. 10]], 0) ===> [10, 9, 8, 7, 3, 2, 1]
foldl(foldl_tester, [[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) ===> [10, 9, 8, 7, 1, 0, -1, -7, -8, -9, -10]
foldl(foldl_tester, [[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) ===> [6, 5, 4, 3, 1, 0, -1, -3, -4, -5, -6]
foldl(foldl_tester, [[-1], [1], [3], [5], [7], [9]], 0) ===> [9, 7, 5, 3, 1, -1]
*** Test foldl2/6 ***
foldl2(foldl2_tester, [], 0) ===> {0, 0}
foldl2(foldl2_tester, [[-1]], 0) ===> {-1, 1}
foldl2(foldl2_tester, [[0]], 0) ===> {0, 1}
foldl2(foldl2_tester, [[1]], 0) ===> {1, 1}
foldl2(foldl2_tester, [[-3 .. -1]], 0) ===> {-6, 3}
foldl2(foldl2_tester, [[-1 .. 1]], 0) ===> {0, 3}
foldl2(foldl2_tester, [[1 .. 3]], 0) ===> {6, 3}
foldl2(foldl2_tester, [[-10 .. -7], [-3 .. -1]], 0) ===> {-40, 7}
foldl2(foldl2_tester, [[1 .. 3], [7 .. 10]], 0) ===> {40, 7}
foldl2(foldl2_tester, [[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) ===> {0, 11}
foldl2(foldl2_tester, [[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) ===> {0, 11}
foldl2(foldl2_tester, [[-1], [1], [3], [5], [7], [9]], 0) ===> {24, 6}
*** Test foldl3/8 ***
foldl3(foldl3_tester, [], 0) ===> {0, 0, 0}
foldl3(foldl3_tester, [[-1]], 0) ===> {-1, 1, -1}
foldl3(foldl3_tester, [[0]], 0) ===> {0, 1, -1}
foldl3(foldl3_tester, [[1]], 0) ===> {1, 1, -1}
foldl3(foldl3_tester, [[-3 .. -1]], 0) ===> {-6, 3, -3}
foldl3(foldl3_tester, [[-1 .. 1]], 0) ===> {0, 3, -3}
foldl3(foldl3_tester, [[1 .. 3]], 0) ===> {6, 3, -3}
foldl3(foldl3_tester, [[-10 .. -7], [-3 .. -1]], 0) ===> {-40, 7, -7}
foldl3(foldl3_tester, [[1 .. 3], [7 .. 10]], 0) ===> {40, 7, -7}
foldl3(foldl3_tester, [[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) ===> {0, 11, -11}
foldl3(foldl3_tester, [[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) ===> {0, 11, -11}
foldl3(foldl3_tester, [[-1], [1], [3], [5], [7], [9]], 0) ===> {24, 6, -6}
*** Test foldr/4 ***
foldr(foldr_tester, [], 0) ===> []
foldr(foldr_tester, [[-1]], 0) ===> [-1]
foldr(foldr_tester, [[0]], 0) ===> [0]
foldr(foldr_tester, [[1]], 0) ===> [1]
foldr(foldr_tester, [[-3 .. -1]], 0) ===> [-3, -2, -1]
foldr(foldr_tester, [[-1 .. 1]], 0) ===> [-1, 0, 1]
foldr(foldr_tester, [[1 .. 3]], 0) ===> [1, 2, 3]
foldr(foldr_tester, [[-10 .. -7], [-3 .. -1]], 0) ===> [-10, -9, -8, -7, -3, -2, -1]
foldr(foldr_tester, [[1 .. 3], [7 .. 10]], 0) ===> [1, 2, 3, 7, 8, 9, 10]
foldr(foldr_tester, [[-10 .. -7], [-1 .. 1], [7 .. 10]], 0) ===> [-10, -9, -8, -7, -1, 0, 1, 7, 8, 9, 10]
foldr(foldr_tester, [[-6 .. -3], [-1 .. 1], [3 .. 6]], 0) ===> [-6, -5, -4, -3, -1, 0, 1, 3, 4, 5, 6]
foldr(foldr_tester, [[-1], [1], [3], [5], [7], [9]], 0) ===> [-1, 1, 3, 5, 7, 9]
*** Test range_foldl/4 ***
range_foldl(range_foldl_tester, [], []) ===> []
range_foldl(range_foldl_tester, [[-1]], []) ===> [{-1, -1}]
range_foldl(range_foldl_tester, [[0]], []) ===> [{0, 0}]
range_foldl(range_foldl_tester, [[1]], []) ===> [{1, 1}]
range_foldl(range_foldl_tester, [[-3 .. -1]], []) ===> [{-3, -1}]
range_foldl(range_foldl_tester, [[-1 .. 1]], []) ===> [{-1, 1}]
range_foldl(range_foldl_tester, [[1 .. 3]], []) ===> [{1, 3}]
range_foldl(range_foldl_tester, [[-10 .. -7], [-3 .. -1]], []) ===> [{-3, -1}, {-10, -7}]
range_foldl(range_foldl_tester, [[1 .. 3], [7 .. 10]], []) ===> [{7, 10}, {1, 3}]
range_foldl(range_foldl_tester, [[-10 .. -7], [-1 .. 1], [7 .. 10]], []) ===> [{7, 10}, {-1, 1}, {-10, -7}]
range_foldl(range_foldl_tester, [[-6 .. -3], [-1 .. 1], [3 .. 6]], []) ===> [{3, 6}, {-1, 1}, {-6, -3}]
range_foldl(range_foldl_tester, [[-1], [1], [3], [5], [7], [9]], []) ===> [{9, 9}, {7, 7}, {5, 5}, {3, 3}, {1, 1}, {-1, -1}]
*** Test range_foldl/6 ***
range_foldl2(range_foldl2_tester, [], [], 0) ===> {[], 0}
range_foldl2(range_foldl2_tester, [[-1]], [], 0) ===> {[{-1, -1}], 1}
range_foldl2(range_foldl2_tester, [[0]], [], 0) ===> {[{0, 0}], 1}
range_foldl2(range_foldl2_tester, [[1]], [], 0) ===> {[{1, 1}], 1}
range_foldl2(range_foldl2_tester, [[-3 .. -1]], [], 0) ===> {[{-3, -1}], 1}
range_foldl2(range_foldl2_tester, [[-1 .. 1]], [], 0) ===> {[{-1, 1}], 1}
range_foldl2(range_foldl2_tester, [[1 .. 3]], [], 0) ===> {[{1, 3}], 1}
range_foldl2(range_foldl2_tester, [[-10 .. -7], [-3 .. -1]], [], 0) ===> {[{-3, -1}, {-10, -7}], 2}
range_foldl2(range_foldl2_tester, [[1 .. 3], [7 .. 10]], [], 0) ===> {[{7, 10}, {1, 3}], 2}
range_foldl2(range_foldl2_tester, [[-10 .. -7], [-1 .. 1], [7 .. 10]], [], 0) ===> {[{7, 10}, {-1, 1}, {-10, -7}], 3}
range_foldl2(range_foldl2_tester, [[-6 .. -3], [-1 .. 1], [3 .. 6]], [], 0) ===> {[{3, 6}, {-1, 1}, {-6, -3}], 3}
range_foldl2(range_foldl2_tester, [[-1], [1], [3], [5], [7], [9]], [], 0) ===> {[{9, 9}, {7, 7}, {5, 5}, {3, 3}, {1, 1}, {-1, -1}], 6}
*** Test range_foldr/4 ***
range_foldr(range_foldr_tester, [], []) ===> []
range_foldr(range_foldr_tester, [[-1]], []) ===> [{-1, -1}]
range_foldr(range_foldr_tester, [[0]], []) ===> [{0, 0}]
range_foldr(range_foldr_tester, [[1]], []) ===> [{1, 1}]
range_foldr(range_foldr_tester, [[-3 .. -1]], []) ===> [{-3, -1}]
range_foldr(range_foldr_tester, [[-1 .. 1]], []) ===> [{-1, 1}]
range_foldr(range_foldr_tester, [[1 .. 3]], []) ===> [{1, 3}]
range_foldr(range_foldr_tester, [[-10 .. -7], [-3 .. -1]], []) ===> [{-10, -7}, {-3, -1}]
range_foldr(range_foldr_tester, [[1 .. 3], [7 .. 10]], []) ===> [{1, 3}, {7, 10}]
range_foldr(range_foldr_tester, [[-10 .. -7], [-1 .. 1], [7 .. 10]], []) ===> [{-10, -7}, {-1, 1}, {7, 10}]
range_foldr(range_foldr_tester, [[-6 .. -3], [-1 .. 1], [3 .. 6]], []) ===> [{-6, -3}, {-1, 1}, {3, 6}]
range_foldr(range_foldr_tester, [[-1], [1], [3], [5], [7], [9]], []) ===> [{-1, -1}, {1, 1}, {3, 3}, {5, 5}, {7, 7}, {9, 9}]