Skip to content

Commit

Permalink
Grains test fix #81 (#92)
Browse files Browse the repository at this point in the history
Co-authored-by: Erik Schierboom <[email protected]>
  • Loading branch information
Average-user and ErikSchierboom authored Mar 31, 2023
1 parent 4de632b commit 8c17339
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions exercises/practice/grains/grains_tests.plt
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,31 @@ pending :-
:- begin_tests(grains).

test(first, condition(true)) :-
square(1, Result),
Result == 1.
square(1, Result), Result == 1.

test(second, condition(pending)) :-
square(2, 2).
square(2, Result), Result == 2.

test(third, condition(pending)) :-
square(3, 4).
square(3, Result), Result == 4.

test(sixteen, condition(pending)) :-
square(16, 32768).
square(16, Result), Result == 32768.

test(twenty_three, condition(pending)) :-
square(23, 4194304).
square(23, Result), Result == 4194304.

test(thirty_two, condition(pending)) :-
square(32, 2147483648).
square(32, Result), Result == 2147483648.

test(fifty_five, condition(pending)) :-
square(55, 18014398509481984).
square(55, Result), Result == 18014398509481984.

test(sixty_four, condition(pending)) :-
square(64, 9223372036854775808).
square(64, Result), Result == 9223372036854775808.

test(total, condition(pending)) :-
total(18446744073709551615).
total(Result), Result == 18446744073709551615.

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

0 comments on commit 8c17339

Please sign in to comment.