From 9690e1bef8553797f2dd9178035bc5b8f7a894ac Mon Sep 17 00:00:00 2001 From: Dimitar Georgiev Date: Wed, 30 Oct 2024 14:23:40 +0200 Subject: [PATCH] Make UtilitiesTest work under scala 3 expect implementation --- src/test/scala/weaver/pure/UtilitiesTest.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/scala/weaver/pure/UtilitiesTest.scala b/src/test/scala/weaver/pure/UtilitiesTest.scala index c29022c..d595bc4 100644 --- a/src/test/scala/weaver/pure/UtilitiesTest.scala +++ b/src/test/scala/weaver/pure/UtilitiesTest.scala @@ -9,13 +9,14 @@ import util._ object UtilitiesTest extends Suite { override def suitesStream: Stream[IO, Test] = Stream( - pureTest("outcomeToString") { + pureTest("outcomeToString contains source location and assertion failure body") { val test = Test("some test", expect(1 === 2)) - val asString = outcomeToString(toTestOutcome(test)) + val testOutcome = toTestOutcome(test) + val asString = outcomeToString(testOutcome) expect(asString.contains("UtilitiesTest.scala")) and - expect(asString.contains("expect(1 === 2)")) + expect(asString.contains("1 === 2")) } )