Skip to content

Commit 2aca2bd

Browse files
committed
added tests for mid/2, refs #7
1 parent 1dae560 commit 2aca2bd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests.lgt

+10-1
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,18 @@
9494
test(interval_arithmetic_div_3_03, fail) :-
9595
new(1, 2, X),
9696
new(-1, 1, Y),
97-
div(X, Y, Div).
97+
div(X, Y, _).
9898

9999
% mid/2 tests
100+
test(interval_arithmetic_mid_2_01, deterministic) :-
101+
new(1, 2, X),
102+
mid(X, Mid),
103+
number::approximately_equal(Mid, 1.5, 0.01).
104+
105+
test(interval_arithmetic_mid_2_02, fail) :-
106+
new(1, 2, X),
107+
mid(X, Mid),
108+
number::approximately_equal(Mid, 1.3, 0.01).
100109

101110
% wid/2 tests
102111

0 commit comments

Comments
 (0)