From ff47728b5b81dda608e1bc67426d22453a041c95 Mon Sep 17 00:00:00 2001 From: Yannick Gottschalk Date: Mon, 15 May 2017 19:05:24 +0200 Subject: [PATCH] Patch for failing test --- test/Game-Spec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Game-Spec.hs b/test/Game-Spec.hs index f2cc857..1288131 100644 --- a/test/Game-Spec.hs +++ b/test/Game-Spec.hs @@ -19,7 +19,7 @@ instance Arbitrary World where mx <- choose (1, dx-1) hy <- choose (1, dy-1) hx <- choose (1, dx-1) `suchThat` (\hx -> mx /= hx || my /= hy) - return $ newWorld (V2 hx hy) (V2 mx my) (dx, dy) + return $ newWorldWithBoss (V2 hx hy) (V2 mx my) (dx, dy) type Step = V2 Integer @@ -30,7 +30,7 @@ bewegungProp1 :: World -> Step -> Property bewegungProp1 world d = and ((world^.entities.to findMax._1.to (subtract d) - world^.heroPos)^..each.to (> 0)) && (world^.entities.at (world^.heroPos + d)^?_Just._Floor)^.to isJust ==> - world^.to (performAction (Just $ Move d)).heroPos == (world^.heroPos) + world^.to (flip performAction (Move $ d^.to fromVector)).heroPos == (world^.heroPos) bewegungTest1 = testProperty "Bewegung Test 1" bewegungProp1 -- FIXME: I think I'm broken. What's wrong with me?