Skip to content
Permalink
Browse files

Don't generate duplicate keys in arbitrary JsonF values

  • Loading branch information...
travisbrown committed Mar 13, 2019
1 parent f1bd594 commit add12a6a16857269aab5efadc20030f2ac7789af
@@ -141,7 +141,7 @@ trait ArbitraryInstances extends ArbitraryJsonNumberTransformer with CogenInstan
Arbitrary.arbitrary[JsonNumber].map(JNumberF),
Gen.const(JNullF),
Arbitrary.arbitrary[String].map(JStringF),
Arbitrary.arbitrary[Vector[(String, A)]].map(JObjectF.apply),
Arbitrary.arbitrary[Vector[(String, A)]].map(_.groupBy(_._1).mapValues(_.head._2).toVector).map(JObjectF.apply),
Arbitrary.arbitrary[Vector[A]].map(JArrayF.apply)
)
)

0 comments on commit add12a6

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.