Skip to content

Commit

Permalink
Support 0 or 1 arg to randomDouble
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Jul 28, 2019
1 parent 54b85b9 commit 12a30af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Fake.hs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ eval (FunctionCall (Function "randomChar" [])) = randomChar
eval (FunctionCall (Function "randomInt" [])) = randomInt (IntLiteral 0) (IntLiteral 2147483647)
eval (FunctionCall (Function "randomInt" [upper])) = randomInt (IntLiteral 0) upper
eval (FunctionCall (Function "randomInt" [lower, upper])) = randomInt lower upper
eval (FunctionCall (Function "randomDouble" [])) = randomDouble (DoubleLiteral 0) (DoubleLiteral 1.7976931348623157E308)
eval (FunctionCall (Function "randomDouble" [upper])) = randomDouble (DoubleLiteral 0) upper
eval (FunctionCall (Function "randomDouble" [lower, upper])) = randomDouble lower upper
eval (FunctionCall (Function "randomDate" [])) = dayAsValue <$> randomDate Nothing Nothing
eval (FunctionCall (Function "randomDate" [lower, upper])) = do
Expand Down

0 comments on commit 12a30af

Please sign in to comment.