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

Commit a8089de

Browse files
committed
Fix tests
1 parent e8e0db5 commit a8089de

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/Test/Data/Map.purs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Control.Monad.Eff (Eff)
88
import Control.Monad.Eff.Console (log, CONSOLE)
99
import Control.Monad.Eff.Exception (EXCEPTION)
1010
import Control.Monad.Eff.Random (RANDOM)
11+
import Data.NonEmpty ((:|))
1112
import Data.Foldable (foldl, for_, all)
1213
import Data.Function (on)
1314
import Data.List (List(Cons), groupBy, length, nubBy, singleton, sort, sortBy)
@@ -40,7 +41,7 @@ instance showSmallKey :: Show SmallKey where
4041
show J = "J"
4142

4243
instance arbSmallKey :: Arbitrary SmallKey where
43-
arbitrary = elements A [B, C, D, E, F, G, H, I, J]
44+
arbitrary = elements $ A :| [B, C, D, E, F, G, H, I, J]
4445

4546
data Instruction k v = Insert k v | Delete k
4647

@@ -49,7 +50,7 @@ instance showInstruction :: (Show k, Show v) => Show (Instruction k v) where
4950
show (Delete k) = "Delete (" <> show k <> ")"
5051

5152
instance arbInstruction :: (Arbitrary k, Arbitrary v) => Arbitrary (Instruction k v) where
52-
arbitrary = oneOf (Insert <$> arbitrary <*> arbitrary) [Delete <$> arbitrary]
53+
arbitrary = oneOf $ (Insert <$> arbitrary <*> arbitrary) :| [Delete <$> arbitrary]
5354

5455
runInstructions :: forall k v. Ord k => List (Instruction k v) -> M.Map k v -> M.Map k v
5556
runInstructions instrs t0 = foldl step t0 instrs

0 commit comments

Comments
 (0)