Browse Source

refactoring: move --> lab_move

main^2
Joe Lukas Kalb 11 months ago
committed by Peter Wiebe
parent
commit
c8af86ef90
  1. 2
      src/main/c/labyrinth.c
  2. 2
      src/main/c/labyrinth.h
  3. 2
      src/test/c/test_labyrinth.c

2
src/main/c/labyrinth.c

@ -22,7 +22,7 @@ void turn_direction_right(Direction *direction){
} }
} }
void move(unsigned short *x, unsigned short *y, Direction direction){
void lab_move(unsigned short *x, unsigned short *y, Direction direction){
if (direction == N){ if (direction == N){
*x = 0; *x = 0;

2
src/main/c/labyrinth.h

@ -4,6 +4,6 @@
#include "global.h" #include "global.h"
void turn_direction_right(Direction *direction); void turn_direction_right(Direction *direction);
void move(unsigned short *x, unsigned short *y, Direction direction);
void lab_move(unsigned short *x, unsigned short *y, Direction direction);
#endif // TEST_H #endif // TEST_H

2
src/test/c/test_labyrinth.c

@ -75,7 +75,7 @@ void test_lab_move_from_1_1_N_expected_0_1(void)
unsigned short y_expected = 1; unsigned short y_expected = 1;
/* act */ /* act */
move(&x, &y, direction);
lab_move(&x, &y, direction);
/* assert */ /* assert */
TEST_ASSERT_TRUE(x == x_expected && y == y_expected); TEST_ASSERT_TRUE(x == x_expected && y == y_expected);

Loading…
Cancel
Save