@ -13,5 +13,8 @@ void turn_direction_right(Direction *direction){
case E:
*direction = S;
break;
case S:
*direction = W;
}
@ -37,3 +37,17 @@ void test_turn_direction_right_from_E_expected_S(void)
/* assert */
TEST_ASSERT_TRUE(expected == actual);
void test_turn_direction_right_from_S_expected_W(void)
{
/* arrange */
Direction actual = S;
Direction expected = W;
/* act */
turn_direction_right(&actual);