Skip to content

Commit 5bdf8d0

Browse files
committed
added tests for sub/3, refs #7
1 parent d0160ab commit 5bdf8d0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests.lgt

+11
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@
5353
Sum == [6, 7].
5454

5555
% sub/3 tests
56+
test(interval_arithmetic_sub_3_01, deterministic) :-
57+
new(1, 2, X),
58+
new(3, 4, Y),
59+
sub(X, Y, Sub),
60+
Sub == [-3, -1].
61+
62+
test(interval_arithmetic_sub_3_02, fail) :-
63+
new(1, 2, X),
64+
new(3, 4, Y),
65+
sub(X, Y, Sub),
66+
Sub == [5, 6].
5667

5768
% mul/3 tests
5869

0 commit comments

Comments
 (0)