We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95b4e0e commit 7c33e77Copy full SHA for 7c33e77
test/Test/Main.purs
@@ -183,7 +183,18 @@ genericsCheck = do
183
}]}
184
185
186
+eitherCheck = do
187
+ log "Test EncodeJson/DecodeJson Either instance"
188
+ quickCheck \(x :: Either String String) ->
189
+ case decodeJson (encodeJson x) of
190
+ Right decoded ->
191
+ decoded == x
192
+ <?> ("x = " <> show x <> ", decoded = " <> show decoded)
193
+ Left err ->
194
+ false <?> err
195
+
196
main = do
197
+ eitherCheck
198
encodeDecodeCheck
199
combinatorsCheck
200
genericsCheck
0 commit comments