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

Commit 3668e60

Browse files
committed
Remove deprecated arb-instances dependency
1 parent b8bbc62 commit 3668e60

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

bower.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
"package.json"
2323
],
2424
"devDependencies": {
25-
"purescript-quickcheck": "*",
26-
"purescript-arb-instances": "*"
25+
"purescript-quickcheck": "*"
2726
},
2827
"dependencies": {
2928
"purescript-arrays": "*",

tests/Data/Map.purs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import Data.Function (on)
99
import Data.Foldable (foldl)
1010

1111
import Test.QuickCheck
12-
import Test.QuickCheck.Tuple
1312

1413
import qualified Data.Map as M
1514
import qualified Data.Set as S
1615

1716
instance arbMap :: (Eq k, Ord k, Arbitrary k, Arbitrary v) => Arbitrary (M.Map k v) where
18-
arbitrary = M.fromList <<< map runTestTuple <$> arbitrary
17+
arbitrary = M.fromList <$> arbitrary
1918

2019
instance arbSet :: (Eq a, Ord a, Arbitrary a) => Arbitrary (S.Set a) where
2120
arbitrary = S.fromList <$> arbitrary
@@ -157,8 +156,7 @@ mapTests = do
157156

158157
trace "toList . fromList = id"
159158
quickCheck $ \arr -> let f x = M.toList (M.fromList x)
160-
arr' = runTestTuple <$> arr
161-
in f (f arr') == f (arr' :: [Tuple SmallKey Number]) <?> show arr
159+
in f (f arr) == f (arr :: [Tuple SmallKey Number]) <?> show arr
162160

163161
trace "fromList . toList = id"
164162
quickCheck $ \m -> let f m = M.fromList (M.toList m) in

tests/Data/StrMap.purs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ import Data.Function (on)
1010
import Data.Foldable (foldl)
1111

1212
import Test.QuickCheck
13-
import Test.QuickCheck.Tuple
1413

1514
import qualified Data.StrMap as M
1615

1716
instance arbStrMap :: (Arbitrary v) => Arbitrary (M.StrMap v) where
18-
arbitrary = M.fromList <<< map runTestTuple <$> arbitrary
17+
arbitrary = M.fromList <$> arbitrary
1918

2019
data Instruction k v = Insert k v | Delete k
2120

@@ -82,8 +81,7 @@ strMapTests = do
8281

8382
trace "toList . fromList = id"
8483
quickCheck $ \arr -> let f x = M.toList (M.fromList x)
85-
arr' = runTestTuple <$> arr
86-
in f (f arr') == f (arr' :: [Tuple String Number]) <?> show arr
84+
in f (f arr) == f (arr :: [Tuple String Number]) <?> show arr
8785

8886
trace "fromList . toList = id"
8987
quickCheck $ \m -> let f m = M.fromList (M.toList m) in

0 commit comments

Comments
 (0)