From 77507dd0e8b88538d64ac9fea44c76229160a3ed Mon Sep 17 00:00:00 2001 From: Olafur Pall Geirsson Date: Sun, 29 Mar 2020 12:03:43 +0000 Subject: [PATCH] Fix failing test --- .../munit/ScalaCheckFrameworkSuite.scala | 52 +++++++++---------- .../src/test/scala/munit/ClueSuite.scala | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/shared/src/main/scala/munit/ScalaCheckFrameworkSuite.scala b/tests/shared/src/main/scala/munit/ScalaCheckFrameworkSuite.scala index c46ad8b9..5694e6af 100644 --- a/tests/shared/src/main/scala/munit/ScalaCheckFrameworkSuite.scala +++ b/tests/shared/src/main/scala/munit/ScalaCheckFrameworkSuite.scala @@ -44,30 +44,30 @@ class ScalaCheckFrameworkSuite extends ScalaCheckSuite { object ScalaCheckFrameworkSuite extends FrameworkTest( classOf[ScalaCheckFrameworkSuite], - s"""|==> success munit.ScalaCheckFrameworkSuite.boolean check (true) - |==> failure munit.ScalaCheckFrameworkSuite.boolean check (false) - /scala/munit/ScalaCheckFrameworkSuite.scala:19 - |18: - |19: property("boolean check (false)") { - |20: forAll { (n: Int) => - | - |Falsified after 0 passed tests. - |> ARG_0: -1 - |> ARG_0_ORIGINAL: 2147483647 - |==> success munit.ScalaCheckFrameworkSuite.tagged - |==> success munit.ScalaCheckFrameworkSuite.assertions (true) - |==> failure munit.ScalaCheckFrameworkSuite.assertions (false) - /scala/munit/ScalaCheckFrameworkSuite.scala:41 - |40: assertEquals(n * 1, n) - |41: assertEquals(n * n, n) - |42: assertEquals(n + 0, n) - |values are not the same - |=> Obtained - |1 - |=> Diff (- obtained, + expected) - |-1 - |+-1 - | - |Falsified after 0 passed tests. - |> ARG_0: -1 - |> ARG_0_ORIGINAL: 2147483647 - |""".stripMargin + """|==> success munit.ScalaCheckFrameworkSuite.boolean check (true) + |==> failure munit.ScalaCheckFrameworkSuite.boolean check (false) - /scala/munit/ScalaCheckFrameworkSuite.scala:19 + |18: + |19: property("boolean check (false)") { + |20: forAll { (n: Int) => scala.math.sqrt(n * n) == n } + | + |Falsified after 0 passed tests. + |> ARG_0: -1 + |> ARG_0_ORIGINAL: 2147483647 + |==> success munit.ScalaCheckFrameworkSuite.tagged + |==> success munit.ScalaCheckFrameworkSuite.assertions (true) + |==> failure munit.ScalaCheckFrameworkSuite.assertions (false) - /scala/munit/ScalaCheckFrameworkSuite.scala:37 + |36: assertEquals(n * 1, n) + |37: assertEquals(n * n, n) + |38: assertEquals(n + 0, n) + |values are not the same + |=> Obtained + |1 + |=> Diff (- obtained, + expected) + |-1 + |+-1 + | + |Falsified after 0 passed tests. + |> ARG_0: -1 + |> ARG_0_ORIGINAL: 2147483647 + |""".stripMargin ) diff --git a/tests/shared/src/test/scala/munit/ClueSuite.scala b/tests/shared/src/test/scala/munit/ClueSuite.scala index 713ea51b..d0569197 100644 --- a/tests/shared/src/test/scala/munit/ClueSuite.scala +++ b/tests/shared/src/test/scala/munit/ClueSuite.scala @@ -16,7 +16,7 @@ class ClueSuite extends BaseSuite { // Disabled on Dotty because the starting position doesn't include opening "(" check( "lambda".tag(NoDotty), { (y: String) => y.head }, - "(y: String) =>\n y.head" + "(y: String) => y.head" ) checkPrint(