Skip to content

Commit

Permalink
Improve complex_numbers tests
Browse files Browse the repository at this point in the history
Now these tests actually test results properly.
  • Loading branch information
mbramson committed Jul 1, 2018
1 parent 37e36cd commit beb898d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exercises/complex-numbers/complex_numbers_tests.plt
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ pending :-
:- begin_tests(exponent).

test(eulers_identity, condition(pending)) :-
exponent((0,pi), (X,Y)), X \= -1, Y \= 0.
exponent((0,pi), (X,Y)), X > -1.001, X < -0.999, Y > -0.001, Y< 0.001.

test(exponential_of_zero, condition(pending)) :-
exponent((0,0), (X,Y)), X \= 1, Y \= 0.
exponent((0,0), (X,Y)), X > 0.999, X < 1.001, Y > -0.001, Y < 0.001.

test(exponential_of_purely_real_number, condition(pending)) :-
exponent((1,0), (X,Y)), X \= e, Y \= 0.
exponent((1,0), (X,Y)), X > e - 0.001, X < e + 0.001, Y > -0.001, Y < 0.001.

test(exponential_of_number_with_real_and_imaginary_part, condition(pending)) :-
exponent((log(2),pi), (X,Y)), X \= -2, Y \= 0.
exponent((log(2),pi), (X,Y)), X > -2.001, X < -1.999, Y > -0.001, Y < 0.001.

:- end_tests(exponent).

0 comments on commit beb898d

Please sign in to comment.