Skip to content

Commit bd5219e

Browse files
committed
Rename data constructor
1 parent 3a7cfac commit bd5219e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/test-geometry.hs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ tests :: [Test]
2222
tests =
2323
[ testCase "Basic arithmetic holds." $ 2 @=? 1+1
2424
, testCase "Monoid of Partition is intersection." $
25-
Box (Vec [1]) (Vec [10]) <> Box (Vec [2]) (Vec [12]) @?= (Box 2 10 :: Partition)
25+
Orthotope (Vec [1]) (Vec [10]) <> Orthotope (Vec [2]) (Vec [12]) @?= (Orthotope 2 10 :: Partition)
2626
, testCase "Top is smallest, Bottom is largest." $
27-
Box (Vec [Top]) (Vec [Bottom]) <> Box (Vec [3]) (Vec [5]) @?= (Box 3 5 :: Partition)
27+
Orthotope (Vec [Top]) (Vec [Bottom]) <> Orthotope (Vec [3]) (Vec [5]) @?= (Orthotope 3 5 :: Partition)
2828
, testCase "Top is smallest, Bottom is largest." $
29-
Box (Vec [Bottom]) (Vec [Top]) <> Box (Vec [3]) (Vec [5]) @?=
30-
(Box (pure Bottom) (pure Top) :: Partition)
31-
, testProperty "Finite Box moves as expected." $ \vx vy ax ay bx by ->
32-
move (Vec [vx,vy]) (Box (Vec [ax,ay]) (Vec [bx,by])) ==
33-
(Box (Vec [ax+vx,ay+vy]) (Vec [bx+vx,by+vy]))
34-
, testProperty "Infinite Box moves as expected." $ \vx vy ax bx ->
35-
move (Vec [vx,vy]) (Box (Vec [pure ax,Top]) (Vec [pure bx,Bottom])) ==
36-
(Box (Vec [pure $ ax+vx,Top]) (Vec [pure $ bx+vx,Bottom]) :: Partition)
29+
Orthotope (Vec [Bottom]) (Vec [Top]) <> Orthotope (Vec [3]) (Vec [5]) @?=
30+
(Orthotope (pure Bottom) (pure Top) :: Partition)
31+
, testProperty "Finite Orthotope moves as expected." $ \vx vy ax ay bx by ->
32+
move (Vec [vx,vy]) (Orthotope (Vec [ax,ay]) (Vec [bx,by])) ==
33+
(Orthotope (Vec [ax+vx,ay+vy]) (Vec [bx+vx,by+vy]))
34+
, testProperty "Infinite Orthotope moves as expected." $ \vx vy ax bx ->
35+
move (Vec [vx,vy]) (Orthotope (Vec [pure ax,Top]) (Vec [pure bx,Bottom])) ==
36+
(Orthotope (Vec [pure $ ax+vx,Top]) (Vec [pure $ bx+vx,Bottom]) :: Partition)
3737
]
3838

3939
main :: IO ()

0 commit comments

Comments
 (0)