diff --git a/Ganeti/HTools/QC.hs b/Ganeti/HTools/QC.hs index c91c5b85f896d887e9cbe5a627f81fb9771839e4..429edd11b7fa2db4e8aa0a5039773db3ab05c695 100644 --- a/Ganeti/HTools/QC.hs +++ b/Ganeti/HTools/QC.hs @@ -24,12 +24,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -} module Ganeti.HTools.QC - ( test_PeerMap - , test_Container - , test_Instance - , test_Node - , test_Text - , test_Cluster + ( testPeerMap + , testContainer + , testInstance + , testNode + , testText + , testCluster ) where import Test.QuickCheck @@ -122,7 +122,7 @@ prop_PeerMap_maxElem pmap = where _types = pmap::PeerMap.PeerMap puniq = PeerMap.accumArray const pmap -test_PeerMap = +testPeerMap = [ run prop_PeerMap_addIdempotent , run prop_PeerMap_removeIdempotent , run prop_PeerMap_maxElem @@ -140,7 +140,7 @@ prop_Container_addTwo cdata i1 i2 = cont = foldl (\c x -> Container.add x x c) Container.empty cdata fn x1 x2 = Container.addTwo x1 x1 x2 x2 -test_Container = +testContainer = [ run prop_Container_addTwo ] -- Simple instance tests, we only have setter/getters @@ -178,7 +178,7 @@ prop_Instance_runStatus_False inst = in run_tx /= "running" && run_tx /= "ERROR_up" ==> run_st == False -test_Instance = +testInstance = [ run prop_Instance_setIdx , run prop_Instance_setName , run prop_Instance_setPri @@ -216,7 +216,7 @@ prop_Text_Load_Instance name mem dsk vcpus status pnode snode pdx sdx = Instance.pNode i == pdx && Instance.sNode i == rsdx) -test_Text = +testText = [ run prop_Text_Load_Instance ] @@ -239,7 +239,7 @@ prop_Node_addSec node inst pdx = ==> isFailure (Node.addSec node inst pdx) where _types = (node::Node.Node, inst::Instance.Instance, pdx::Int) -test_Node = +testNode = [ run prop_Node_addPri , run prop_Node_addSec ] @@ -259,6 +259,6 @@ prop_Score_Zero node count = -- this should be much lower than the default score in CLI.hs in score <= 1e-15 -test_Cluster = +testCluster = [ run prop_Score_Zero ] diff --git a/test.hs b/test.hs index c1a2229a5f9419f20aaf4962b3fc000e00d29824..85470e6ae21ec179e7995c04af23dde94dc4d39a 100644 --- a/test.hs +++ b/test.hs @@ -59,12 +59,12 @@ main :: IO () main = do errs <- newIORef 0 let wrap lst = map (wrapTest errs) lst - runTests "PeerMap" options $ wrap test_PeerMap - runTests "Container" options $ wrap test_Container - runTests "Instance" options $ wrap test_Instance - runTests "Node" options $ wrap test_Node - runTests "Text" options $ wrap test_Text - runTests "Cluster" options $ wrap test_Cluster + runTests "PeerMap" options $ wrap testPeerMap + runTests "Container" options $ wrap testContainer + runTests "Instance" options $ wrap testInstance + runTests "Node" options $ wrap testNode + runTests "Text" options $ wrap testText + runTests "Cluster" options $ wrap testCluster terr <- readIORef errs (if (terr > 0) then do