1 {-# LANGUAGE TemplateHaskell #-}
2 {-# OPTIONS_GHC -fno-warn-orphans #-}
4 {-| Unittests for "Ganeti.Errors".
10 Copyright (C) 2012 Google Inc.
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
29 module Test.Ganeti.Errors (testErrors) where
31 import Test.QuickCheck
33 import Test.Ganeti.TestHelper
34 import Test.Ganeti.TestCommon
36 import qualified Ganeti.Errors as Errors
38 $(genArbitrary ''Errors.ErrorCode)
40 $(genArbitrary ''Errors.GanetiException)
42 -- | Tests error serialisation.
43 prop_GenericError_serialisation :: Errors.GanetiException -> Property
44 prop_GenericError_serialisation = testSerialisation
47 [ 'prop_GenericError_serialisation