Revision 5b11f8db htest/Test/Ganeti/HTools/CLI.hs

b/htest/Test/Ganeti/HTools/CLI.hs
43 43
import qualified Ganeti.HTools.Program as Program
44 44
import qualified Ganeti.HTools.Types as Types
45 45

  
46
{-# ANN module "HLint: ignore Use camelCase" #-}
47

  
46 48
-- | Test correct parsing.
47 49
prop_parseISpec :: String -> Int -> Int -> Int -> Property
48 50
prop_parseISpec descr dsk mem cpu =
......
52 54
-- | Test parsing failure due to wrong section count.
53 55
prop_parseISpecFail :: String -> Property
54 56
prop_parseISpecFail descr =
55
  forAll (choose (0,100) `suchThat` ((/=) 3)) $ \nelems ->
57
  forAll (choose (0,100) `suchThat` (/= 3)) $ \nelems ->
56 58
  forAll (replicateM nelems arbitrary) $ \values ->
57 59
  let str = intercalate "," $ map show (values::[Int])
58 60
  in case parseISpecString descr str of
......
101 103

  
102 104
-- | Tests a few invalid arguments.
103 105
case_wrong_arg :: Assertion
104
case_wrong_arg = do
106
case_wrong_arg =
105 107
  mapM_ (passFailOpt defaultOptions assertFailure (return ()))
106 108
        [ (oSpindleUse,   "-1", "1")
107 109
        , (oSpindleUse,   "a",  "1")

Also available in: Unified diff