@@ -27,9 +27,9 @@ trait CoregexArbitraries {
2727
2828 type Flags <: Int
2929 implicit val arbitraryFlags : Arbitrary [Flags ] = Arbitrary (genFlags)
30- def genFlags : Gen [Flags ] =
30+ def genFlags : Gen [Flags ] =
3131 for {
32- n <- Gen .choose(0 , 9 )
32+ n <- Gen .choose(0 , 9 )
3333 flags <- Gen .listOfN(
3434 n,
3535 Gen .oneOf(
@@ -46,7 +46,7 @@ trait CoregexArbitraries {
4646 )
4747 } yield flags.foldLeft(0 )(_ | _).asInstanceOf [Flags ]
4848
49- implicit val arbitraryCoregex : Arbitrary [Coregex ] = Arbitrary (genCoregex())
49+ implicit val arbitraryCoregex : Arbitrary [Coregex ] = Arbitrary (genCoregex())
5050 def genCoregex (charGen : Gen [Char ] = Gen .alphaNumChar): Gen [Coregex ] =
5151 for {
5252 single <- Gen .sized { height =>
@@ -66,15 +66,15 @@ trait CoregexArbitraries {
6666 )
6767 } yield coregex
6868
69- implicit val arbitraryCoregexConcat : Arbitrary [Coregex .Concat ] = Arbitrary (genCoregexConcat())
69+ implicit val arbitraryCoregexConcat : Arbitrary [Coregex .Concat ] = Arbitrary (genCoregexConcat())
7070 def genCoregexConcat (charGen : Gen [Char ] = Gen .alphaNumChar): Gen [Coregex .Concat ] =
7171 for {
7272 first <- Gen .sized(h => Gen .resize(h / 4 , genCoregex(charGen)))
7373 size <- Gen .size
7474 rest <- Gen .listOfN(size % 10 , Gen .resize(size / 4 , genCoregex(charGen)))
7575 } yield new Coregex .Concat (first, rest : _* )
7676
77- implicit val arbitraryCoregexLiteral : Arbitrary [Coregex .Literal ] = Arbitrary (genCoregexLiteral())
77+ implicit val arbitraryCoregexLiteral : Arbitrary [Coregex .Literal ] = Arbitrary (genCoregexLiteral())
7878 def genCoregexLiteral (charGen : Gen [Char ] = Gen .alphaNumChar): Gen [Coregex .Literal ] =
7979 for (literal <- Gen .stringOf(charGen); flags <- genFlags) yield new Coregex .Literal (literal, flags)
8080 implicit def shrinkCoregexLiteral (implicit shrinkLiteral : Shrink [String ]): Shrink [Coregex .Literal ] =
@@ -85,7 +85,7 @@ trait CoregexArbitraries {
8585 def genCoregexSet (charGen : Gen [Char ] = Gen .alphaNumChar): Gen [Coregex .Set ] = genSet(charGen).map(new Coregex .Set (_))
8686 def shrinkCoregexSet (set : Coregex .Set ): LazyList [Coregex .Set ] = shrinkSet(set.set()).map(new Coregex .Set (_))
8787
88- implicit val arbitraryCoregexUnion : Arbitrary [Coregex .Union ] = Arbitrary (genCoregexUnion())
88+ implicit val arbitraryCoregexUnion : Arbitrary [Coregex .Union ] = Arbitrary (genCoregexUnion())
8989 def genCoregexUnion (charGen : Gen [Char ] = Gen .alphaNumChar): Gen [Coregex .Union ] =
9090 for {
9191 first <- Gen .sized(h => Gen .resize(h / 4 , genCoregex(charGen)))
@@ -96,8 +96,8 @@ trait CoregexArbitraries {
9696 implicit val arbitraryRNG : Arbitrary [RNG ] = Arbitrary (genRNG)
9797 def genRNG : Gen [RNG ] = Gen .long.map(new RandomRNG (_))
9898
99- implicit val arbitrarySet : Arbitrary [Set ] = Arbitrary (genSet())
100- implicit val shrinkSet : Shrink [Set ] = Shrink .withLazyList(shrinkSet(_))
99+ implicit val arbitrarySet : Arbitrary [Set ] = Arbitrary (genSet())
100+ implicit val shrinkSet : Shrink [Set ] = Shrink .withLazyList(shrinkSet(_))
101101 def genSet (charGen : Gen [Char ] = Gen .asciiPrintableChar): Gen [Set ] = Gen .recursive[Set ] { fix =>
102102 Gen .oneOf(
103103 for (flags <- genFlags; ch <- charGen; rest <- Gen .stringOf(charGen))
0 commit comments