  Generated with '  v0.2.0 '
%% Revision 1 of the exercises generator was used
%% -specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/robot-simulator/canonical-data.json
%% This file is automatically generated from the exercises canonical data.

-module(robot_simulator_tests).

-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").




'1_at_origin_facing_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    [{"at origin facing north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"at origin facing north (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'2_at_negative_position_facing_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {-1, -1}),
    [{"at negative position facing south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"at negative position facing south (position)",
      ?_assertEqual({-1, -1},
		    robot_simulator:position(Robot))}].

'3_changes_north_to_east_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes north to east (direction)",
      ?_assertEqual(east, robot_simulator:direction(Robot))},
     {"changes north to east (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'4_changes_east_to_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes east to south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"changes east to south (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'5_changes_south_to_west_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes south to west (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"changes south to west (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'6_changes_west_to_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, west, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes west to north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"changes west to north (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'7_changes_north_to_west_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes north to west (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"changes north to west (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'8_changes_west_to_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, west, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes west to south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"changes west to south (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'9_changes_south_to_east_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes south to east (direction)",
      ?_assertEqual(east, robot_simulator:direction(Robot))},
     {"changes south to east (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'10_changes_east_to_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes east to north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"changes east to north (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'11_facing_north_increments_y_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing north increments Y (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"facing north increments Y (position)",
      ?_assertEqual({0, 1},
		    robot_simulator:position(Robot))}].

'12_facing_south_decrements_y_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing south decrements Y (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"facing south decrements Y (position)",
      ?_assertEqual({0, -1},
		    robot_simulator:position(Robot))}].

'13_facing_east_increments_x_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing east increments X (direction)",
      ?_assertEqual(east, robot_simulator:direction(Robot))},
     {"facing east increments X (position)",
      ?_assertEqual({1, 0},
		    robot_simulator:position(Robot))}].

'14_facing_west_decrements_x_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, west, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing west decrements X (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"facing west decrements X (position)",
      ?_assertEqual({-1, 0},
		    robot_simulator:position(Robot))}].

'15_moving_east_and_north_from_readme_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {7, 3}),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    [{"moving east and north from README (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"moving east and north from README (position)",
      ?_assertEqual({9, 4},
		    robot_simulator:position(Robot))}].

'16_moving_west_and_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    [{"moving west and north (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"moving west and north (position)",
      ?_assertEqual({-4, 1},
		    robot_simulator:position(Robot))}].

'17_moving_west_and_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {2, -7}),
    robot_simulator:right(Robot),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    [{"moving west and south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"moving west and south (position)",
      ?_assertEqual({-3, -8},
		    robot_simulator:position(Robot))}].

'18_moving_east_and_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {8, 4}),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:right(Robot),
    robot_simulator:right(Robot),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:left(Robot),
    robot_simulator:left(Robot),
    robot_simulator:left(Robot),
    [{"moving east and north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"moving east and north (position)",
      ?_assertEqual({11, 5},
		    robot_simulator:position(Robot))}].

 Revision 1 of the exercises generator was used
 -specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/robot-simulator/canonical-data.json
 This file is automatically generated from the exercises canonical data.
  Generated with '  v0.2.0 '

-module(robot_simulator_tests).

-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").




'1_at_origin_facing_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    [{"at origin facing north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"at origin facing north (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'2_at_negative_position_facing_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {-1, -1}),
    [{"at negative position facing south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"at negative position facing south (position)",
      ?_assertEqual({-1, -1},
		    robot_simulator:position(Robot))}].

'3_changes_north_to_east_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes north to east (direction)",
      ?_assertEqual(east, robot_simulator:direction(Robot))},
     {"changes north to east (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'4_changes_east_to_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes east to south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"changes east to south (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'5_changes_south_to_west_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes south to west (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"changes south to west (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'6_changes_west_to_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, west, {0, 0}),
    robot_simulator:right(Robot),
    [{"changes west to north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"changes west to north (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'7_changes_north_to_west_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes north to west (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"changes north to west (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'8_changes_west_to_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, west, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes west to south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"changes west to south (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'9_changes_south_to_east_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes south to east (direction)",
      ?_assertEqual(east, robot_simulator:direction(Robot))},
     {"changes south to east (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'10_changes_east_to_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {0, 0}),
    robot_simulator:left(Robot),
    [{"changes east to north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"changes east to north (position)",
      ?_assertEqual({0, 0},
		    robot_simulator:position(Robot))}].

'11_facing_north_increments_y_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing north increments Y (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"facing north increments Y (position)",
      ?_assertEqual({0, 1},
		    robot_simulator:position(Robot))}].

'12_facing_south_decrements_y_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing south decrements Y (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"facing south decrements Y (position)",
      ?_assertEqual({0, -1},
		    robot_simulator:position(Robot))}].

'13_facing_east_increments_x_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing east increments X (direction)",
      ?_assertEqual(east, robot_simulator:direction(Robot))},
     {"facing east increments X (position)",
      ?_assertEqual({1, 0},
		    robot_simulator:position(Robot))}].

'14_facing_west_decrements_x_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, west, {0, 0}),
    robot_simulator:advance(Robot),
    [{"facing west decrements X (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"facing west decrements X (position)",
      ?_assertEqual({-1, 0},
		    robot_simulator:position(Robot))}].

'15_moving_east_and_north_from_readme_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {7, 3}),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    [{"moving east and north from README (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"moving east and north from README (position)",
      ?_assertEqual({9, 4},
		    robot_simulator:position(Robot))}].

'16_moving_west_and_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, north, {0, 0}),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    [{"moving west and north (direction)",
      ?_assertEqual(west, robot_simulator:direction(Robot))},
     {"moving west and north (position)",
      ?_assertEqual({-4, 1},
		    robot_simulator:position(Robot))}].

'17_moving_west_and_south_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, east, {2, -7}),
    robot_simulator:right(Robot),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    [{"moving west and south (direction)",
      ?_assertEqual(south, robot_simulator:direction(Robot))},
     {"moving west and south (position)",
      ?_assertEqual({-3, -8},
		    robot_simulator:position(Robot))}].

'18_moving_east_and_north_test_'() ->
    Robot = robot_simulator:create(),
    robot_simulator:place(Robot, south, {8, 4}),
    robot_simulator:left(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:right(Robot),
    robot_simulator:right(Robot),
    robot_simulator:right(Robot),
    robot_simulator:advance(Robot),
    robot_simulator:left(Robot),
    robot_simulator:left(Robot),
    robot_simulator:left(Robot),
    robot_simulator:left(Robot),
    [{"moving east and north (direction)",
      ?_assertEqual(north, robot_simulator:direction(Robot))},
     {"moving east and north (position)",
      ?_assertEqual({11, 5},
		    robot_simulator:position(Robot))}].
