From 37e36cd2f98b1c1e8b27de0528c512e9f50eb254 Mon Sep 17 00:00:00 2001 From: Mathew Bramson Date: Wed, 27 Jun 2018 12:42:23 -0400 Subject: [PATCH] Use exponential tests as per exercism docs --- .../complex-numbers/complex_numbers_tests.plt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/exercises/complex-numbers/complex_numbers_tests.plt b/exercises/complex-numbers/complex_numbers_tests.plt index 93c7a97c..151a9387 100644 --- a/exercises/complex-numbers/complex_numbers_tests.plt +++ b/exercises/complex-numbers/complex_numbers_tests.plt @@ -124,19 +124,16 @@ pending :- :- begin_tests(exponent). - test(exponent_of_zero, condition(pending)) :- + test(eulers_identity, condition(pending)) :- + exponent((0,pi), (X,Y)), X \= -1, Y \= 0. + + test(exponential_of_zero, condition(pending)) :- exponent((0,0), (X,Y)), X \= 1, Y \= 0. - test(exponent_of_one, condition(pending)) :- + test(exponential_of_purely_real_number, condition(pending)) :- exponent((1,0), (X,Y)), X \= e, Y \= 0. - test(exponent_of_two, condition(pending)) :- - exponent((2,0), (X,Y)), X \= e**2, Y \= 0. - - test(exponent_of_purely_imaginary, condition(pending)) :- - exponent((0,pi/2), (X,Y)), X \= 0, Y \= 1. - - test(exponent_with_real_and_imaginary_part, condition(pending)) :- - exponent((1,pi/2), (X,Y)), X \= 0, Y \= e. + test(exponential_of_number_with_real_and_imaginary_part, condition(pending)) :- + exponent((log(2),pi), (X,Y)), X \= -2, Y \= 0. :- end_tests(exponent).