Permalink
Browse files

Add genTuple example

  • Loading branch information...
adomokos committed Nov 5, 2018
1 parent ba33c9b commit c25a9e4f45bd78f067d87c8c9f19f389ea3104da
Showing with 8 additions and 0 deletions.
  1. +8 −0 test/RomanNumeralsSpec.hs
@@ -1,6 +1,7 @@
module RomanNumeralsSpec where
import Test.Hspec
import Test.QuickCheck
import Data.List (isPrefixOf, find)
import Data.Maybe (fromJust)
@@ -36,6 +37,13 @@ convertFromRoman r =
where
(number, roman) = fromJust $ find (\(_,r') -> r' `isPrefixOf` r) conversions
genTuple :: (Arbitrary a, Arbitrary b)
=> Gen (a, b)
genTuple = do
a <- arbitrary
b <- arbitrary
return (a, b)
spec :: Spec
spec = do
describe "Converting to Roman Numerals" $ do

0 comments on commit c25a9e4

Please sign in to comment.