Skip to content
This repository was archived by the owner on Oct 4, 2020. It is now read-only.

Commit 72fb00b

Browse files
matthewleongaryb
authored andcommitted
use elements where appropriate
Replace a use of oneOf with elements in tests. Also correct for a missing constructor.
1 parent 3527796 commit 72fb00b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Test/Data/Map.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Data.Maybe (Maybe(..), fromMaybe)
1515
import Data.Tuple (Tuple(..), fst)
1616
import Partial.Unsafe (unsafePartial)
1717
import Test.QuickCheck ((<?>), (===), quickCheck, quickCheck')
18-
import Test.QuickCheck.Gen (oneOf)
18+
import Test.QuickCheck.Gen (elements, oneOf)
1919
import Test.QuickCheck.Arbitrary (class Arbitrary, arbitrary)
2020

2121
newtype TestMap k v = TestMap (M.Map k v)
@@ -40,7 +40,7 @@ instance showSmallKey :: Show SmallKey where
4040
show J = "J"
4141

4242
instance arbSmallKey :: Arbitrary SmallKey where
43-
arbitrary = oneOf (pure A) (map pure [B, C, D, E, F, G, H, I])
43+
arbitrary = elements A [B, C, D, E, F, G, H, I, J]
4444

4545
data Instruction k v = Insert k v | Delete k
4646

0 commit comments

Comments
 (0)