Skip to content

Commit 68a3221

Browse files
committed
Fix EverySpec for Dotty
1 parent 9cf2199 commit 68a3221

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

project/GenScalacticDotty.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ object GenScalacticDotty {
149149
def genTest(targetDir: File, version: String, scalaVersion: String): Seq[File] =
150150
copyDir("scalactic-test/src/test/scala/org/scalactic", "org/scalactic", targetDir,
151151
List(
152-
"EverySpec.scala", // Compilation error to be investigated further
153152
"NormalizationSpec.scala", // Compilation error to be investigated further.
154153
"NormMethodsSpec.scala", // Compilation error to be investigated further.
155154
"OrSpec.scala", // Compilation error to be investigated further.

scalactic-test/src/test/scala/org/scalactic/EverySpec.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ class EverySpec extends UnitSpec {
129129
}
130130
}
131131
it should "have an apply method" in {
132-
Every(1, 2, 3)(0) shouldEqual 1
133-
Every(1, 2, 3)(1) shouldEqual 2
132+
Every(1, 2, 3)(0) shouldEqual 1
133+
Every(1, 2, 3)(1) shouldEqual 2
134134
One("hi")(0) shouldEqual "hi"
135135
Many(7, 8, 9)(2) shouldEqual 9
136136
val vectorOutOfBoundsException = intercept[IndexOutOfBoundsException] {
@@ -223,7 +223,7 @@ class EverySpec extends UnitSpec {
223223
// Could have an implicit conversion from Every[Char] to CharSequence like
224224
// there is for Seq in Predef.
225225
/*
226-
scala> Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).collect { case i if i > 10 == 0 => i / 2 }
226+
scala> Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).collect { case i if i > 10 == 0 => i / 2 }
227227
res1: scala.collection.immutable.Vector[Int] = Vector()
228228
*/
229229
it should "have an collectFirst method" in {
@@ -325,7 +325,7 @@ class EverySpec extends UnitSpec {
325325
}
326326

327327
/*
328-
it should not have an drop method
328+
it should not have an drop method
329329
scala> Vector(1, 2, 3).drop(3)
330330
res1: scala.collection.immutable.Vector[Int] = Vector()
331331
@@ -655,9 +655,11 @@ class EverySpec extends UnitSpec {
655655
Every(-1, -2, 3, 4, 5).minBy(_.abs) shouldBe -1
656656
}
657657
it should "have a mkString method" in {
658-
658+
// SKIP-DOTTY-START
659+
// https://github.com/lampepfl/dotty/issues/6705
659660
One("hi").mkString shouldBe "hi"
660661
Many(1, 2, 3).mkString shouldBe "123"
662+
// SKIP-DOTTY-END
661663

662664
One("hi").mkString("#") shouldBe "hi"
663665
Many(1, 2, 3).mkString("#") shouldBe "1#2#3"
@@ -1013,7 +1015,7 @@ class EverySpec extends UnitSpec {
10131015
scala> Vector(1, 2, 3).take(-1)
10141016
res12: scala.collection.immutable.Vector[Int] = Vector()
10151017
1016-
it should not have a takeRight method
1018+
it should not have a takeRight method
10171019
scala> Vector(1).takeRight(1)
10181020
res13: scala.collection.immutable.Vector[Int] = Vector(1)
10191021
scala> Vector(1).takeRight(0)

0 commit comments

Comments
 (0)