Skip to content

Commit

Permalink
collatz-conjecture: fix tests (#200)
Browse files Browse the repository at this point in the history
See #81
  • Loading branch information
ErikSchierboom authored Mar 31, 2023
1 parent e1bd549 commit fd30c66
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ pending :-
:- begin_tests(collatz_conjecture).

test(zero_steps_for_one, condition(true)) :-
collatz_steps(1, 0).
collatz_steps(1, Steps), Steps == 0.

test(divide_if_even, condition(pending)) :-
collatz_steps(16, 4).
collatz_steps(16, Steps), Steps == 4.

test(even_and_odd_steps, condition(pending)) :-
collatz_steps(12, 9).
collatz_steps(12, Steps), Steps == 9.

test(large_number_of_even_and_odd_steps, condition(pending)) :-
collatz_steps(1_000_000, 152).
collatz_steps(1_000_000, Steps), Steps == 152.

test(zero_is_an_error, [fail, condition(pending)]) :-
collatz_steps(0, _).
Expand Down

0 comments on commit fd30c66

Please sign in to comment.