diff options
Diffstat (limited to 'test.hs')
-rw-r--r-- | test.hs | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -7,6 +7,8 @@ import Test.HUnit import Test.HUnit.Tools +import Test.QuickCheck + import System.Directory import System.Posix.Directory (changeWorkingDirectory) import System.Posix.Files @@ -42,6 +44,18 @@ import qualified Key import qualified Config import qualified Crypto +-- for quickcheck +instance Arbitrary Key.Key where + arbitrary = do + n <- arbitrary + b <- elements ['A'..'Z'] + return $ Key.Key { + Key.keyName = n, + Key.keyBackendName = [b], + Key.keySize = Nothing, + Key.keyMtime = Nothing + } + main :: IO () main = do prepare |