Anton Shestakov <engored@ya.ru>, Sat, 08 Mar 2014 23:36:15 +0900
Slightly more consistent naming of variables in rps_rules:parse/2.
test/rps3_tests.erl
Permissions: -rw-r--r--
-include_lib("eunit/include/eunit.hrl"). ?assertEqual(3, length(rps3:get_hands())). ?assertEqual(paper, rps3:winning_hand([rock, paper])), ?assertEqual(scissors, rps3:winning_hand([paper, scissors])), ?assertEqual(rock, rps3:winning_hand([scissors, rock])), ?assertEqual(rock, rps3:winning_hand([rock, rock, rock])), ?assertEqual(undefined, rps3:winning_hand([rock, paper, scissors])), ?assertEqual(paper, rps3:winning_hand([rock, paper, paper])), ?assertEqual(paper, rps3:winning_hand([rock, rock, paper])).