1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00

Stub in a quick Arbitrary instance for Child.

This commit is contained in:
Rob Rix 2016-05-20 15:34:20 -04:00
parent 72455cdecd
commit 13a90624de

View File

@ -27,6 +27,7 @@ import Syntax
import Term
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
spec :: Spec
spec = parallel $ do
@ -186,6 +187,9 @@ data Child = Child
, childMargin :: [Char]
}
instance Arbitrary Child where
arbitrary = Child <$> arbitrary <*> arbitrary <*> arbitrary
counts :: [Join These (Int, a)] -> Both Int
counts numbered = fromMaybe 0 . getLast . mconcat . fmap Last <$> Join (unalign (runJoin . fmap Prelude.fst <$> numbered))