Skip to content

Commit 2387a74

Browse files
committed
Merge pull request #2 from zudov/bump-deps
Bump deps
2 parents 7138d83 + 22422e7 commit 2387a74

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

bower.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
],
1919
"license": "MIT",
2020
"dependencies": {
21-
"purescript-argonaut-core": "~0.1.0",
22-
"purescript-maybe": "~0.3.2",
23-
"purescript-either": "~0.2.0",
24-
"purescript-arrays": "~0.4.0",
25-
"purescript-strings": "~0.5.3",
21+
"purescript-argonaut-core": "~0.2.0",
22+
"purescript-maybe": "~0.3.4",
23+
"purescript-either": "~0.2.1",
24+
"purescript-arrays": "~0.4.2",
25+
"purescript-strings": "~0.7.0",
2626
"purescript-lists": "~0.7.0",
27-
"purescript-maps": "~0.4.0",
27+
"purescript-maps": "~0.5.0",
2828
"purescript-foldable-traversable": "~0.4.0",
2929
"purescript-unfoldable": "~0.4.0",
3030
"purescript-tuples": "~0.4.0",
@@ -33,6 +33,6 @@
3333
"devDependencies": {
3434
"purescript-eff": "~0.1.0",
3535
"purescript-console": "~0.1.0",
36-
"purescript-strongcheck": "~0.10.0"
36+
"purescript-strongcheck": "0.12.0"
3737
}
3838
}

test/Test/Main.purs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,18 @@ genJson n = frequency (Tuple 1.0 genJNull) rest where
5151
Tuple 1.0 (genJArray n),
5252
Tuple 1.0 (genJObject n)]
5353

54-
-- orphan, but it's just for tests
55-
instance arbitraryJson :: Arbitrary Json where
56-
arbitrary = sized genJson
54+
newtype TestJson = TestJson Json
5755

56+
instance arbitraryTestJson :: Arbitrary TestJson where
57+
arbitrary = TestJson <$> sized genJson
5858

59-
prop_encode_then_decode :: Json -> Boolean
60-
prop_encode_then_decode json =
59+
60+
prop_encode_then_decode :: TestJson -> Boolean
61+
prop_encode_then_decode (TestJson json) =
6162
Right json == (decodeJson $ encodeJson $ json)
6263

63-
prop_decode_then_encode :: Json -> Boolean
64-
prop_decode_then_encode json =
64+
prop_decode_then_encode :: TestJson -> Boolean
65+
prop_decode_then_encode (TestJson json) =
6566
let decoded = (decodeJson json) :: Either String Json in
6667
Right json == (decoded >>= (encodeJson >>> pure))
6768

@@ -90,9 +91,10 @@ instance arbitraryObj :: Arbitrary Obj where
9091
arbitrary = Obj <$> (genJObject 5)
9192

9293

93-
prop_assoc_append :: (Tuple JAssoc Obj) -> Boolean
94-
prop_assoc_append (Tuple assoc@(Tuple key val) (Obj obj)) =
94+
prop_assoc_append :: (Tuple (Tuple String TestJson) Obj) -> Boolean
95+
prop_assoc_append (Tuple (Tuple key (TestJson val)) (Obj obj)) =
9596
let appended = assoc ~> obj
97+
assoc = Tuple key val
9698
in case toObject appended >>= M.lookup key of
9799
Just val -> true
98100
_ -> false

0 commit comments

Comments
 (0)