From 61307263c9ec3627df867836fc7e4db812c54621 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 19 Dec 2012 16:36:19 -0400 Subject: more quickcheck fun --- Annex/Content/Direct.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Annex') diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 64182ddc6..75a32e3fc 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -17,7 +17,8 @@ module Annex.Content.Direct ( removeCache, genCache, toCache, - Cache + Cache(..), + prop_read_show_direct ) where import Common.Annex @@ -123,6 +124,10 @@ readCache s = case words s of <*> readish mtime _ -> Nothing +-- for quickcheck +prop_read_show_direct :: Cache -> Bool +prop_read_show_direct c = readCache (showCache c) == Just c + genCache :: FilePath -> IO (Maybe Cache) genCache f = catchDefaultIO Nothing $ toCache <$> getFileStatus f -- cgit v1.2.3