From cce30754bc0118654ac7f7714df93e6ed2f7d6fc Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Wed, 12 Dec 2012 06:29:50 -0800
Subject: [PATCH] Improve a few Graph test properties

Return type is changed from Property to Bool, and the ==? True at the
end is dropped.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 htest/Test/Ganeti/HTools/Graph.hs | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/htest/Test/Ganeti/HTools/Graph.hs b/htest/Test/Ganeti/HTools/Graph.hs
index 55ac065e2..31a619a2e 100644
--- a/htest/Test/Ganeti/HTools/Graph.hs
+++ b/htest/Test/Ganeti/HTools/Graph.hs
@@ -97,26 +97,24 @@ anyTwo _ [_] = True
 anyTwo op (x:y:xs) = (x `op` y) && anyTwo op (y:xs)
 
 -- | Check order of vertices returned by verticesByDegreeAsc.
-prop_verticesByDegreeAscAsc :: TestableGraph -> Property
-prop_verticesByDegreeAscAsc (TestableGraph g) =
-    anyTwo (<=) (degrees asc) ==? True
+prop_verticesByDegreeAscAsc :: TestableGraph -> Bool
+prop_verticesByDegreeAscAsc (TestableGraph g) = anyTwo (<=) (degrees asc)
     where degrees = map (length . neighbors g)
           asc = verticesByDegreeAsc g
 
 -- | Check order of vertices returned by verticesByDegreeDesc.
-prop_verticesByDegreeDescDesc :: TestableGraph -> Property
-prop_verticesByDegreeDescDesc (TestableGraph g) =
-    anyTwo (>=) (degrees desc) ==? True
+prop_verticesByDegreeDescDesc :: TestableGraph -> Bool
+prop_verticesByDegreeDescDesc (TestableGraph g) = anyTwo (>=) (degrees desc)
     where degrees = map (length . neighbors g)
           desc = verticesByDegreeDesc g
 
 -- | Check that our generated graphs are colorable
-prop_isColorableTestableGraph :: TestableGraph -> Property
-prop_isColorableTestableGraph (TestableGraph g) = isColorable g ==? True
+prop_isColorableTestableGraph :: TestableGraph -> Bool
+prop_isColorableTestableGraph (TestableGraph g) = isColorable g
 
 -- | Check that our generated graphs are colorable
-prop_isColorableTestableClique :: TestableClique -> Property
-prop_isColorableTestableClique (TestableClique g) = isColorable g ==? True
+prop_isColorableTestableClique :: TestableClique -> Bool
+prop_isColorableTestableClique (TestableClique g) = isColorable g
 
 -- | Check that the given algorithm colors a clique with the same number of
 -- colors as the vertices number.
-- 
GitLab