Skip to content

Commit 3b6a827

Browse files
committed
scalafmt update.
1 parent eb1876d commit 3b6a827

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.9.6"
1+
version = "3.9.7"
22
runner.dialect = Scala213Source3
33
maxColumn = 120
44
align.preset = more

core/src/test/scala/com/github/simy4/coregex/core/CoregexArbitraries.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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))

core/src/test/scala/com/github/simy4/coregex/core/CoregexSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CoregexSuite extends ScalaCheckSuite with CoregexArbitraries {
5454

5555
property("double quantified should multiply quantification") {
5656
forAll { (coregex: Coregex, first: QuantifyRange, second: QuantifyRange, rng: RNG) =>
57-
val quantified = coregex.quantify(first.min * second.min, first.min * second.min, first.`type`)
57+
val quantified = coregex.quantify(first.min * second.min, first.min * second.min, first.`type`)
5858
val doubleQuantified =
5959
coregex.quantify(first.min, first.min, first.`type`).quantify(second.min, second.min, second.`type`)
6060
quantified.generate(rng) ?= doubleQuantified.generate(rng)
@@ -80,7 +80,7 @@ class CoregexSuite extends ScalaCheckSuite with CoregexArbitraries {
8080
val sizedMinLengthCheck = (coregex.minLength() ?= sized
8181
.minLength()) :| s"$coregex.minLength(${coregex.minLength()}) == $sized.minLength(${sized.minLength()})"
8282
val sizedMaxLengthCheck = (-1 < coregex.maxLength()) ==> (coregex.maxLength() min size ?= sized.maxLength())
83-
val sizedLength =
83+
val sizedLength =
8484
(sized.minLength() <= generated.length() && generated.length <= size) :| s"$sized.minLength(${sized
8585
.minLength()}) <= $generated.length(${generated.length}) <= $size"
8686

@@ -160,7 +160,7 @@ class CoregexSuite extends ScalaCheckSuite with CoregexArbitraries {
160160
forAll { (union: Coregex.Union, rng: RNG) =>
161161
val generated = union.generate(rng)
162162

163-
val nextRng = rng.genLong().getFirst
163+
val nextRng = rng.genLong().getFirst
164164
val inSetCheck = union
165165
.union()
166166
.stream()

core/src/test/scala/com/github/simy4/coregex/core/SetSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SetSuite extends ScalaCheckSuite with CoregexArbitraries {
2525
property("sampled should be in range") {
2626
forAll { (ch1: Char, ch2: Char, seed: Long) =>
2727
val start = ch1 min ch2
28-
val end = {
28+
val end = {
2929
val end = ch1 max ch2
3030
if (start == end) (end + 1).asInstanceOf[Char] else end
3131
}

0 commit comments

Comments
 (0)