aboutsummaryrefslogtreecommitdiffstats
path: root/src/Test/VeriFuzz/Verilog/AST.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Test/VeriFuzz/Verilog/AST.hs')
-rw-r--r--src/Test/VeriFuzz/Verilog/AST.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Test/VeriFuzz/Verilog/AST.hs b/src/Test/VeriFuzz/Verilog/AST.hs
index f0178cf..4c3649d 100644
--- a/src/Test/VeriFuzz/Verilog/AST.hs
+++ b/src/Test/VeriFuzz/Verilog/AST.hs
@@ -15,6 +15,7 @@ Defines the types to build a Verilog AST.
module Test.VeriFuzz.Verilog.AST where
import Control.Lens
+import Control.Monad (replicateM)
import qualified Data.Graph.Inductive as G
import Data.String
import Data.Text (Text)
@@ -257,8 +258,9 @@ instance QC.Arbitrary Text where
arbitrary = T.pack <$> QC.arbitrary
instance QC.Arbitrary Identifier where
- arbitrary = Identifier . T.pack <$>
- (QC.shuffle (['a'..'z'] <> ['A'..'Z']) >>= QC.sublistOf)
+ arbitrary = do
+ l <- QC.choose (2, 10)
+ Identifier . T.pack <$> replicateM l (QC.elements ['a'..'z'])
instance QC.Arbitrary Number where
arbitrary = Number <$> QC.suchThat QC.arbitrary (>0) <*> QC.arbitrary