~zinigor/cardano-node/trunk

« back to all changes in this revision

Viewing changes to cardano-api/test/Test/Tasty/Hedgehog/Group.hs

  • Committer: Igor Zinovyev
  • Date: 2021-08-13 19:12:27 UTC
  • Revision ID: zinigor@gmail.com-20210813191227-stlnsj3mc5ypwn0c
Tags: upstream-1.27.0
ImportĀ upstreamĀ versionĀ 1.27.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module Test.Tasty.Hedgehog.Group
 
2
  ( fromGroup
 
3
  )
 
4
where
 
5
 
 
6
import           Prelude
 
7
 
 
8
import           Hedgehog (Group (..), Property)
 
9
import           Hedgehog.Internal.Property (GroupName (..), PropertyName (..))
 
10
import           Test.Tasty (TestTree, testGroup)
 
11
import           Test.Tasty.Hedgehog (testProperty)
 
12
 
 
13
fromGroup :: Group -> TestTree
 
14
fromGroup group =
 
15
    testGroup (unGroupName $ groupName group) $
 
16
      map mkTestTree (groupProperties group)
 
17
  where
 
18
    mkTestTree :: (PropertyName, Property) -> TestTree
 
19
    mkTestTree (propName, prop) = testProperty (unPropertyName propName) prop