Revision 9b773665 htest/Test/Ganeti/OpCodes.hs

b/htest/Test/Ganeti/OpCodes.hs
410 410
-- | Check that Python and Haskell defined the same opcode list.
411 411
case_AllDefined :: HUnit.Assertion
412 412
case_AllDefined = do
413
  py_stdout <- runPython "from ganeti import opcodes\n\
414
                         \print '\\n'.join(opcodes.OP_MAPPING.keys())" "" >>=
415
               checkPythonResult
416
  let py_ops = sort $ lines py_stdout
417
      hs_ops = OpCodes.allOpIDs
418
      -- extra_py = py_ops \\ hs_ops
413
  let py_ops = sort C.opcodesOpIds
414
      hs_ops = sort OpCodes.allOpIDs
415
      extra_py = py_ops \\ hs_ops
419 416
      extra_hs = hs_ops \\ py_ops
420
  -- FIXME: uncomment when we have parity
421
  -- HUnit.assertBool ("OpCodes missing from Haskell code:\n" ++
422
  --                  unlines extra_py) (null extra_py)
417
  HUnit.assertBool ("Missing OpCodes from the Haskell code:\n" ++
418
                    unlines extra_py) (null extra_py)
423 419
  HUnit.assertBool ("Extra OpCodes in the Haskell code code:\n" ++
424 420
                    unlines extra_hs) (null extra_hs)
425 421

  

Also available in: Unified diff