Skip to content

Commit ff7e299

Browse files
committed
added tests for div/3, refs #7
1 parent 489a4ba commit ff7e299

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests.lgt

+16
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,22 @@
7979
Mul == [1, 4].
8080

8181
% div/3 tests
82+
test(interval_arithmetic_div_3_01, deterministic) :-
83+
new(1, 2, X),
84+
new(4, 5, Y),
85+
div(X, Y, Div),
86+
Div == [0.2, 0.5].
87+
88+
test(interval_arithmetic_div_3_02, fail) :-
89+
new(1, 2, X),
90+
new(4, 5, Y),
91+
div(X, Y, Div),
92+
Div == [0.2, 0.25].
93+
94+
test(interval_arithmetic_div_3_03, fail) :-
95+
new(1, 2, X),
96+
new(-1, 1, Y),
97+
div(X, Y, Div).
8298

8399
% mid/2 tests
84100

0 commit comments

Comments
 (0)