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:
parent
72455cdecd
commit
13a90624de
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user