Skip to content

Commit 11e91e7

Browse files
authored
Update scalafmt-core to 3.5.8 (mockito#460)
1 parent 42677fb commit 11e91e7

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

.scalafmt.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ maxColumn = 180
66
rewrite.rules = [RedundantBraces, RedundantParens, SortImports]
77
spaces.inImportCurlyBraces = true
88
indentOperator.preset = spray
9-
unindentTopLevelOperators = true
109

11-
version=3.3.3
10+
version=3.5.8
1211

cats/src/main/scala/org/mockito/cats/EqToEquality.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class EqToEquality[T: Eq] extends Equality[T] {
88
override def areEqual(a: T, b: Any): Boolean =
99
(a == null && b == null) || (
1010
a != null &&
11-
b != null &&
12-
b.getClass == a.getClass &&
13-
a === b.asInstanceOf[T]
11+
b != null &&
12+
b.getClass == a.getClass &&
13+
a === b.asInstanceOf[T]
1414
)
1515
}

macro/src/main/scala/org/mockito/VerifyMacro.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ private[mockito] trait VerificationMacroTransformer {
106106
q"""
107107
if (_root_.org.mockito.MockitoSugar.mockingDetails($a).isMock) {
108108
${called match {
109-
case q"$_.calledAgain" =>
110-
val calledPattern = show(q"$a.$b")
111-
q"""throw new _root_.org.mockito.exceptions.misusing.NotAMockException(Seq(
109+
case q"$_.calledAgain" =>
110+
val calledPattern = show(q"$a.$b")
111+
q"""throw new _root_.org.mockito.exceptions.misusing.NotAMockException(Seq(
112112
"[" + $calledPattern + "] is not a mock!",
113113
"Example of correct verification:",
114114
" myMock wasNever called",
115115
""
116116
).mkString("\n"))
117117
"""
118-
case _ => transformInvocation(c)(q"$a.$b", order, q"_root_.org.mockito.VerifyMacro.Never")
119-
}}
118+
case _ => transformInvocation(c)(q"$a.$b", order, q"_root_.org.mockito.VerifyMacro.Never")
119+
}}
120120
} else {
121121
${transformMockWasNeverCalled(q"$a.$b", called)}
122122
}

scalatest/src/test/scala/user/org/mockito/captor/ArgCaptorTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class ArgCaptorTest extends AnyWordSpec with MockitoSugar with Matchers {
151151

152152
error.getMessage should (
153153
include("Got [it worked again!] instead of [it worked!]") and
154-
include("Also expected 1 more: [it worked again!]")
154+
include("Also expected 1 more: [it worked again!]")
155155
)
156156
}
157157

@@ -172,7 +172,7 @@ class ArgCaptorTest extends AnyWordSpec with MockitoSugar with Matchers {
172172

173173
error.getMessage should (
174174
include("Got [it worked!] instead of [it worked again!]") and
175-
include("Also got 1 more: [it worked again!]")
175+
include("Also got 1 more: [it worked again!]")
176176
)
177177
}
178178
}

scalaz/src/main/scala/org/mockito/scalaz/EqToEquality.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class EqToEquality[T: Equal] extends Equality[T] {
88
override def areEqual(a: T, b: Any): Boolean =
99
(a == null && b == null) || (
1010
a != null &&
11-
b != null &&
12-
b.getClass == a.getClass &&
13-
a === b.asInstanceOf[T]
11+
b != null &&
12+
b.getClass == a.getClass &&
13+
a === b.asInstanceOf[T]
1414
)
1515
}

specs2/src/test/scala/org/mockito/specs2/MockitoScalaSpec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ The Mockito trait is reusable in other contexts
527527

528528
implicit val order = inOrder(list1, list2)
529529
(there was one(list1).get(0) andThen
530-
one(list2).get(0)).message must_== "The mock was called as expected"
530+
one(list2).get(0)).message must_== "The mock was called as expected"
531531
}
532532

533533
def order2 = {
@@ -543,7 +543,7 @@ The Mockito trait is reusable in other contexts
543543

544544
implicit val order = inOrder(ignoreStubs(list1, list2))
545545
(there was one(list1).get(0) andThen
546-
one(list2).get(0)).message must_== "The mock was called as expected"
546+
one(list2).get(0)).message must_== "The mock was called as expected"
547547
}
548548

549549
def order3 = {
@@ -586,7 +586,7 @@ The Mockito trait is reusable in other contexts
586586

587587
implicit val order = inOrder(list1, list2)
588588
(there was one(list2).get(0) andThen
589-
one(list1).get(0)).message must startWith("The mock was not called as expected")
589+
one(list1).get(0)).message must startWith("The mock was not called as expected")
590590
}
591591

592592
def order6 = {

0 commit comments

Comments
 (0)