File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
munit-scalacheck/shared/src/main/scala/munit
tests/shared/src/main/scala/munit Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ trait ScalaCheckSuite extends FunSuite {
88
88
case f : FailExceptionLike [_] =>
89
89
// Promote FailException (i.e failed assertions) to property failures
90
90
val r = result.copy(status = Failed (status.args, status.labels))
91
- Failure (f.withMessage(e.getMessage() + " \n\n " + renderResult(r)))
91
+ Failure (f.withMessage(e.getMessage + " \n\n " + renderResult(r)))
92
92
case _ =>
93
93
Failure (
94
94
new FailException (
@@ -101,7 +101,8 @@ trait ScalaCheckSuite extends FunSuite {
101
101
}
102
102
case _ =>
103
103
// Fail using the test location
104
- Try (fail(" \n " + renderResult(result))(test.location))
104
+ implicit val loc = test.location
105
+ Try (fail(" \n " + renderResult(result)))
105
106
}
106
107
}
107
108
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ abstract class BaseFrameworkSuite extends BaseSuite {
30
30
}
31
31
32
32
def check (t : FrameworkTest ): Unit = {
33
+ implicit val loc = t.location
33
34
test(t.cls.getSimpleName().withTags(t.tags)) {
34
35
val baos = new ByteArrayOutputStream ()
35
36
val out = new PrintStream (baos)
@@ -109,8 +110,8 @@ abstract class BaseFrameworkSuite extends BaseSuite {
109
110
obtained,
110
111
t.expected,
111
112
stdout
112
- )(t.location)
113
+ )
113
114
}
114
- }(t.location)
115
+ }
115
116
}
116
117
}
You can’t perform that action at this time.
0 commit comments