Skip to content

Commit d0160ab

Browse files
committed
added tests for add/3 predicate, refs #7
1 parent 33d8aaf commit d0160ab

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests.lgt

+12-1
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,22 @@
3535
new(1, 3, X),
3636
is_in(X, 0).
3737

38-
test(interval_arithmetic_is_in_02_03, fail) :-
38+
test(interval_arithmetic_is_in_2_03, fail) :-
3939
new(1, 3, X),
4040
is_in(X, 4).
4141

4242
% add/3 tests
43+
test(interval_arithmetic_add_3_01, deterministic) :-
44+
new(1, 2, X),
45+
new(3, 4, Y),
46+
add(X, Y, Sum),
47+
Sum == [4, 6].
48+
49+
test(interval_arithmetic_add_3_02, fail) :-
50+
new(1, 2, X),
51+
new(3, 4, Y),
52+
add(X, Y, Sum),
53+
Sum == [6, 7].
4354

4455
% sub/3 tests
4556

0 commit comments

Comments
 (0)