File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
cardano-api/gen/Test/Gen/Cardano/Api Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 77module Test.Gen.Cardano.Api.Era
88 ( shelleyBasedEraTestConstraints
99 , conwayEraOnwardsTestConstraints
10+ , genAnyShelleyBasedEra
11+ , genAnyCardanoEra
1012 )
1113where
1214
@@ -18,7 +20,9 @@ import Data.Maybe.Strict
1820
1921import Test.Gen.Cardano.Api.Orphans ()
2022
21- import Test.QuickCheck
23+ import Hedgehog (Gen )
24+ import Hedgehog.Gen qualified as Gen
25+ import Test.QuickCheck hiding (Gen )
2226
2327shelleyBasedEraTestConstraints
2428 :: ()
@@ -50,3 +54,11 @@ conwayEraOnwardsTestConstraints
5054conwayEraOnwardsTestConstraints = \ case
5155 ConwayEraOnwardsConway -> id
5256 ConwayEraOnwardsDijkstra -> id
57+
58+ -- | Generator for any Shelley-based era
59+ genAnyShelleyBasedEra :: Gen AnyShelleyBasedEra
60+ genAnyShelleyBasedEra = Gen. element [minBound .. maxBound ]
61+
62+ -- | Generator for any Cardano era
63+ genAnyCardanoEra :: Gen AnyCardanoEra
64+ genAnyCardanoEra = Gen. element [minBound .. maxBound ]
You can’t perform that action at this time.
0 commit comments