From d08ff5fbf2b40746cacc8e799f6c7b5b0b932669 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 4 Dec 2018 16:54:56 +0000 Subject: [Fix #1] Fix the negative number generation --- src/Test/VeriFuzz/VerilogAST.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Test/VeriFuzz/VerilogAST.hs') diff --git a/src/Test/VeriFuzz/VerilogAST.hs b/src/Test/VeriFuzz/VerilogAST.hs index 48d01a5..41c855a 100644 --- a/src/Test/VeriFuzz/VerilogAST.hs +++ b/src/Test/VeriFuzz/VerilogAST.hs @@ -77,7 +77,7 @@ instance QC.Arbitrary Identifier where (QC.shuffle (['a'..'z'] <> ['A'..'Z']) >>= QC.sublistOf) instance QC.Arbitrary Number where - arbitrary = Number <$> QC.arbitrary <*> QC.arbitrary + arbitrary = Number <$> (suchThat QC.arbitrary (>=0)) <*> QC.arbitrary instance QC.Arbitrary BinaryOperator where arbitrary = QC.elements [BinAnd, BinOr, BinXor] -- cgit