mirror of
https://github.com/iritmaximus/haskell.git
synced 2026-10-12 19:13:39 +03:00
@@ -133,6 +133,9 @@ twoPersons name1 age1 employed1 name2 age2 employed2 = todo
|
||||
--
|
||||
-- Hint: remember readMaybe
|
||||
--
|
||||
-- PS. The tests won't test special cases of Int literals like hexadecimal
|
||||
-- (0x3a) or octal (0o14).
|
||||
--
|
||||
-- Examples:
|
||||
-- boolOrInt "True" ==> Ok (Left True)
|
||||
-- boolOrInt "13" ==> Ok (Right 13)
|
||||
|
||||
@@ -149,7 +149,7 @@ sow (x:xs) (y:ys) = oneof [fmap (x:) $ sow xs (y:ys)
|
||||
,fmap (y:) $ sow (x:xs) ys]
|
||||
|
||||
ex7_fail = forAll_ $ \(i::Int) ->
|
||||
forAllBlind (choose ('a','z')) $ \c ->
|
||||
forAllBlind (choose ('a','n')) $ \c -> -- don't generate 0o or 0x by accident
|
||||
forAllBlind (shuffle (c:show i)) $ \ni ->
|
||||
forAll_ $ \(b::Bool) ->
|
||||
forAllBlind (sow [c] (show b)) $ \nb ->
|
||||
|
||||
Reference in New Issue
Block a user