@ -3,6 +3,6 @@
typedef enum {
N, E, S, W
} Dir;
} Direction;
#endif
@ -5,7 +5,7 @@
#include "stdio.h"
#include "stdlib.h"
void change_direction(Dir *direction){
void turn_direction_right(Direction *direction){
switch (*direction) {
case N:
*direction = E;
#include "global.h"
void change_direction(Dir *direction);
void turn_direction_right(Direction *direction);
#endif // TEST_H
@ -15,11 +15,11 @@ void tearDown(void)
void test_change_direction_from_N_expected_E(void)
{
/* arrange */
Dir actual = N;
Dir expected = E;
Direction actual = N;
Direction expected = E;
/* act */
change_direction(&actual);
turn_direction_right(&actual);
/* assert */
TEST_ASSERT_TRUE(expected == actual);