Skip to content

Commit b07b0a7

Browse files
thalesmgsshine
authored andcommitted
robot-simulator: bump version to 3.2.0 and update test titles
Comparing the current tests (3.1.0.7) with the current canonical version for this exercise (3.2.0), the descriptions and titles have changed in the PR exercism/problem-specifications#1525
1 parent 2b3f3d1 commit b07b0a7

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

exercises/robot-simulator/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: robot-simulator
2-
version: 3.1.0.7
2+
version: 3.2.0.8
33

44
dependencies:
55
- base

exercises/robot-simulator/test/Tests.hs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ specs = do
2626
-- The function described by the reference file
2727
-- as `create` is called `mkRobot` in this track.
2828

29-
it "A robot is created with a position and a direction" $ do
29+
it "Create robot at origin facing north" $ do
3030
let robot = mkRobot North (0, 0)
3131
coordinates robot `shouldBe` (0, 0)
3232
bearing robot `shouldBe` North
3333

34-
it "Negative positions are allowed" $ do
34+
it "Create robot at negative position facing south" $ do
3535
let robot = mkRobot South (-1, -1)
3636
coordinates robot `shouldBe` (-1, -1)
3737
bearing robot `shouldBe` South
@@ -44,21 +44,21 @@ specs = do
4444
it "shouldn't change position" $
4545
coordinates (move robot inst) `shouldBe` (0, 0)
4646

47-
describe "turning right rotates the robot's direction 90 degrees clockwise" $ do
47+
describe "Rotating clockwise" $ do
4848
let rightTest = turnTest "R"
4949
rightTest North East
5050
rightTest East South
5151
rightTest South West
5252
rightTest West North
5353

54-
describe "turning left rotates the robot's direction 90 degrees counter-clockwise" $ do
54+
describe "Rotating counter-clockwise" $ do
5555
let leftTest = turnTest "L"
5656
leftTest North West
5757
leftTest West South
5858
leftTest South East
5959
leftTest East North
6060

61-
describe "advancing" $ do
61+
describe "Moving forward one" $ do
6262
let dir `from` pos = move (mkRobot dir pos) "A"
6363
let test desc dir pos =
6464
describe (show dir ++ " from " ++ show pos) $ do
@@ -67,31 +67,31 @@ specs = do
6767
it desc $
6868
coordinates (dir `from` (0, 0)) `shouldBe` pos
6969

70-
test "increases the y coordinate one when facing north" North (0, 1)
71-
test "decreases the y coordinate by one when facing south" South (0, -1)
72-
test "increases the x coordinate by one when facing east" East (1, 0)
73-
test "decreases the x coordinate by one when facing west" West (-1, 0)
70+
test "facing north increments Y" North (0, 1)
71+
test "facing south decrements Y" South (0, -1)
72+
test "facing east increments X" East (1, 0)
73+
test "facing west decrements X" West (-1, 0)
7474

75-
describe "move" $ do
75+
describe "Follow series of instructions" $ do
7676

7777
let simulation pos dir = move (mkRobot dir pos)
7878

79-
it "instructions to move east and north from README" $ do
79+
it "moving east and north from README" $ do
8080
let robot = simulation (7, 3) North "RAALAL"
8181
coordinates robot `shouldBe` (9, 4)
8282
bearing robot `shouldBe` West
8383

84-
it "instructions to move west and north" $ do
84+
it "moving west and north" $ do
8585
let robot = simulation (0, 0) North "LAAARALA"
8686
coordinates robot `shouldBe` (-4, 1)
8787
bearing robot `shouldBe` West
8888

89-
it "instructions to move west and south" $ do
89+
it "moving west and south" $ do
9090
let robot = simulation (2, -7) East "RRAAAAALA"
9191
coordinates robot `shouldBe` (-3, -8)
9292
bearing robot `shouldBe` South
9393

94-
it "instructions to move east and north" $ do
94+
it "moving east and north" $ do
9595
let robot = simulation (8, 4) South "LAAARRRALLLL"
9696
coordinates robot `shouldBe` (11, 5)
9797
bearing robot `shouldBe` North

0 commit comments

Comments
 (0)